diff --git a/prj/test/functional/processor/src/main/java/processor/AbstractDistEntryProcessorTests.java b/prj/test/functional/processor/src/main/java/processor/AbstractDistEntryProcessorTests.java index 0a1511ac5a608..f241d8d545b30 100644 --- a/prj/test/functional/processor/src/main/java/processor/AbstractDistEntryProcessorTests.java +++ b/prj/test/functional/processor/src/main/java/processor/AbstractDistEntryProcessorTests.java @@ -7,7 +7,6 @@ package processor; - import com.oracle.bedrock.testsupport.deferred.Eventually; import com.oracle.coherence.common.base.Continuation; @@ -76,9 +75,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static com.oracle.bedrock.deferred.DeferredHelper.invoking; -import static com.oracle.bedrock.deferred.DeferredHelper.valueOf; - import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; @@ -86,7 +82,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; - /** * A collection of functional tests for the various * {@link InvocableMap.EntryProcessor} implementations specific to the @@ -128,11 +123,11 @@ public void expiry() new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_NONE, 1L); cache.invoke("key", processor); - Eventually.assertThat(invoking(cache).isEmpty(), is(true)); + Eventually.assertDeferred(cache::isEmpty, is(true)); // ensure setting the expiry for a non-existent entry is a no-op cache.invoke("key2", processor); - Eventually.assertThat(invoking(cache).isEmpty(), is(true)); + Eventually.assertDeferred(cache::isEmpty, is(true)); } /** @@ -150,13 +145,13 @@ public void updateBeforeExpiry() new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_BEFORE_BIN, 1L); cache.invoke("key", processor); - Eventually.assertThat(invoking(cache).isEmpty(), is(true)); + Eventually.assertDeferred(cache::isEmpty, is(true)); // ensure setting the value & expiry for a non-existent entry // functions as expected cache.invoke("key2", new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_BEFORE, 750L)); assertEquals("value2", cache.get("key2")); - Eventually.assertThat(invoking(cache).isEmpty(), is(true)); + Eventually.assertDeferred(cache::isEmpty, is(true)); } /** @@ -206,7 +201,7 @@ public void async() cache.invoke(oKey, new SingleEntryAsynchronousProcessor(proc0)); } - Eventually.assertThat(invoking(cache).size(), is(10)); + Eventually.assertDeferred(cache::size, is(10)); // increment by 2 -> 2 EntryProcessor proc1 = new NumberIncrementor((ValueManipulator) null, Integer.valueOf(2), false); @@ -260,9 +255,6 @@ public void async() { cache = getNamedCache(); - SafeService safeService = (SafeService) cache.getCacheService(); - PartitionedCache distService = (PartitionedCache) safeService.getService(); - waitForBalanced(cache.getCacheService()); cache.invokeAll(AlwaysFilter.INSTANCE, aproc2); @@ -329,7 +321,7 @@ public synchronized void proceed(Object o) notifier.await(5000); - Eventually.assertThat(valueOf(atomicFlag), is(true)); + Eventually.assertDeferred(atomicFlag::get, is(true)); break; } } @@ -410,8 +402,8 @@ public void testSkipKeySerialization() Eventually.assertDeferred(() -> distService.isDistributionStable(), is(true)); SerializationCountingKey.reset(); - Eventually.assertThat(SerializationCountingKey.DESERIALIZATION_COUNTER.get(), is(0)); - Eventually.assertThat(SerializationCountingKey.SERIALIZATION_COUNTER.get(), is(0)); + Eventually.assertDeferred(SerializationCountingKey.DESERIALIZATION_COUNTER::get, is(0)); + Eventually.assertDeferred(SerializationCountingKey.SERIALIZATION_COUNTER::get, is(0)); Map mapResults = cache.invokeAll(setKeys, new OptimizedGetAllProcessor()); Eventually.assertDeferred(mapResults::size, is(setKeys.size()));