throws Exception {
TraceReader reader = new TraceReader(conn);
Collection<TraceHolder> traces = reader.readAll(1);
assertEquals("Got an unexpected number of traces!", 1, traces.size());
// make sure the trace matches what we wrote
TraceHolder trace = traces.iterator().next();
assertEquals("Got an unexpected traceid", traceid, trace.traceid);
assertEquals("Got an unexpected number of spans", records.size(), trace.spans.size());
validateTrace(records, trace);
}