use of com.datastax.oss.driver.api.core.CqlSession in project zipkin by openzipkin.
the class CassandraStorageExtension method blockWhileInFlight.
static void blockWhileInFlight(CassandraStorage storage) {
CqlSession session = storage.session.get();
// Now, block until writes complete, notably so we can read them.
boolean wasInFlight = false;
while (true) {
if (!poolInFlight(session)) {
// give a little more to avoid flakey tests
if (wasInFlight)
sleep(100);
return;
}
wasInFlight = true;
sleep(100);
}
}
Aggregations