(t testing.TB, n int)
| 187 | var testSpanCount = 0 |
| 188 | |
| 189 | func makeTestSpans(t testing.TB, n int) []Span { |
| 190 | spans := make([]Span, 0, n) |
| 191 | for i := 0; i < n; i++ { |
| 192 | testSpanCount++ |
| 193 | |
| 194 | spanID := make([]byte, 8) |
| 195 | _, err := rand.Read(spanID) |
| 196 | require.NoError(t, err) |
| 197 | |
| 198 | spans = append(spans, Span{ |
| 199 | SpanID: spanID, |
| 200 | Name: fmt.Sprintf("span-%d", testSpanCount), |
| 201 | }) |
| 202 | } |
| 203 | return spans |
| 204 | } |
| 205 | |
| 206 | func TestResourceSpanHashNoCollisions(t *testing.T) { |
| 207 | cases := []ResourceSpans{ |
no test coverage detected