@Test protected void getTraces_manyTraces(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span span = spanBuilder(testSuffix).build();
    Map.Entry<String, String> tag = span.tags().entrySet().iterator().next();

    int traceCount = 1000;
    Span[] traces = new Span[traceCount];
    traces[0] = span;

    IntStream.range(1, traces.length).forEach(i ->
      traces[i] = spanBuilder(testSuffix)
        .timestamp((TODAY + i) * 1000).duration(10L)
        .build());

    accept(traces);

    assertGetTracesReturnsCount(requestBuilder().limit(traceCount).build(), traceCount);

    QueryRequest.Builder builder =
      requestBuilder().limit(traceCount).serviceName(span.localServiceName());

    assertGetTracesReturnsCount(
      builder.build(), traceCount);

    assertGetTracesReturnsCount(
      builder.remoteServiceName(span.remoteServiceName()).build(), traceCount);

    assertGetTracesReturnsCount(
      builder.spanName(span.name()).build(), traceCount);

    assertGetTracesReturnsCount(
      builder.parseAnnotationQuery(tag.getKey() + "=" + tag.getValue()).build(), traceCount);
  }
Formerly, a bug was present where cassandra didn't index more than bucket count traces per
millisecond. This stores a lot of spans to ensure indexes work under high-traffic scenarios.
zipkin-tests/src/main/java/zipkin2/storage/ITSpanStoreHeavy.java