(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestGenericCombiner(t *testing.T) { |
| 109 | combiner := newTestCombiner() |
| 110 | |
| 111 | wg := sync.WaitGroup{} |
| 112 | |
| 113 | for i := 0; i < 10; i++ { |
| 114 | wg.Add(1) |
| 115 | go func() { |
| 116 | defer wg.Done() |
| 117 | for j := 0; j < 10000; j++ { |
| 118 | |
| 119 | err := combiner.AddResponse(newTestResponse(t)) |
| 120 | require.NoError(t, err) |
| 121 | } |
| 122 | }() |
| 123 | } |
| 124 | |
| 125 | wg.Wait() |
| 126 | actual, err := combiner.finalize(nil) |
| 127 | require.NoError(t, err) |
| 128 | |
| 129 | expected := 10 * 10000 |
| 130 | require.Equal(t, expected, int(actual.SpanCount)) |
| 131 | require.Equal(t, expected, int(actual.ErrorCount)) |
| 132 | } |
| 133 | |
| 134 | func TestGenericCombinerHoldsErrors(t *testing.T) { |
| 135 | // slam a combiner with successful responses and just one error. confirm that the error is returned |
nothing calls this directly
no test coverage detected