(t *testing.T, e encoding.VersionedEncoding)
| 144 | } |
| 145 | |
| 146 | func testFindByTraceID(t *testing.T, e encoding.VersionedEncoding) { |
| 147 | f := func(ids [][]byte, objs []*tempopb.Trace, block common.WALBlock) { |
| 148 | // find all traces pushed |
| 149 | ctx := context.Background() |
| 150 | for i, id := range ids { |
| 151 | obj, err := block.FindTraceByID(ctx, id, common.DefaultSearchOptions()) |
| 152 | require.NoError(t, err) |
| 153 | require.Equal(t, objs[i], obj.Trace) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | // Test with both append methods |
| 158 | t.Run("Append", func(t *testing.T) { |
| 159 | t.Parallel() |
| 160 | runWALTestWithAppendMode(t, e.Version(), false, f) |
| 161 | }) |
| 162 | t.Run("AppendTrace", func(t *testing.T) { |
| 163 | t.Parallel() |
| 164 | runWALTestWithAppendMode(t, e.Version(), true, f) |
| 165 | }) |
| 166 | } |
| 167 | |
| 168 | func TestIterator(t *testing.T) { |
| 169 | for _, e := range encoding.AllEncodingsForWrites() { |
no test coverage detected