Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.datastax.oss.driver.internal.core.session.BuiltInRequestProcessors;
import com.datastax.oss.driver.internal.core.session.RequestProcessor;
import com.datastax.oss.driver.internal.core.session.RequestProcessorRegistry;
import com.datastax.oss.driver.shaded.guava.common.cache.CacheBuilder;
import com.datastax.oss.driver.shaded.guava.common.cache.RemovalListener;
import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -135,7 +136,9 @@ private static RemovalListener<Object, Object> buildCacheRemoveCallback(
public TestCqlPrepareAsyncProcessor(@NonNull Optional<DefaultDriverContext> context) {
// Default CqlPrepareAsyncProcessor uses weak values here as well. We avoid doing so
// to prevent cache entries from unexpectedly disappearing mid-test.
super(context, builder -> builder.removalListener(buildCacheRemoveCallback(context)));
super(
context,
builder -> CacheBuilder.newBuilder().removalListener(buildCacheRemoveCallback(context)));
}
}

Expand Down Expand Up @@ -267,14 +270,14 @@ private void invalidationTestInner(
session.execute("ALTER TYPE test_type_2 add i blob");

// wait for latches and fail if they don't reach zero before timeout
assertThat(Uninterruptibles.awaitUninterruptibly(typeChangeEventLatch, 10, TimeUnit.SECONDS))
.withFailMessage("typeChangeEventLatch did not trigger before timeout")
.isTrue();
assertThat(
Uninterruptibles.awaitUninterruptibly(
preparedStmtCacheRemoveLatch, 10, TimeUnit.SECONDS))
.withFailMessage("preparedStmtCacheRemoveLatch did not trigger before timeout")
.isTrue();
assertThat(Uninterruptibles.awaitUninterruptibly(typeChangeEventLatch, 10, TimeUnit.SECONDS))
.withFailMessage("typeChangeEventLatch did not trigger before timeout")
.isTrue();

/* Okay, the latch triggered so cache processing should now be done. Let's validate :allthethings: */
assertThat(changedTypes.keySet()).isEqualTo(expectedChangedTypes);
Expand Down
Loading