From 6cef5ff4709f08257a7879ddcc3ea38e63825d43 Mon Sep 17 00:00:00 2001 From: Michael Halberstadt Date: Fri, 3 May 2024 13:50:43 +0200 Subject: [PATCH] fix: improve tests --- .../internal/cluster/entity/ClusterEntityRegistryTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/io/neonbee/internal/cluster/entity/ClusterEntityRegistryTest.java b/src/test/java/io/neonbee/internal/cluster/entity/ClusterEntityRegistryTest.java index 3a859479..d3b9b102 100644 --- a/src/test/java/io/neonbee/internal/cluster/entity/ClusterEntityRegistryTest.java +++ b/src/test/java/io/neonbee/internal/cluster/entity/ClusterEntityRegistryTest.java @@ -80,7 +80,7 @@ void removeClusteringInformation(Vertx vertx, VertxTestContext context) { assertThat(mapValue).isNotEmpty(); checkpoint.flag(); })).compose(unused -> registry.removeClusteringInformation(TestClusterEntityRegistry.CLUSTER_NODE_ID)) - .onSuccess(v -> context.verify(checkpoint::flag)) + .onSuccess(v -> checkpoint.flag()) .onFailure(context::failNow); } @@ -138,8 +138,7 @@ void remove(Vertx vertx, VertxTestContext context) { ClusterEntityRegistry registry = new TestClusterEntityRegistry(vertx, REGISTRY_NAME); registry.register(KEY, VALUE) .compose(unused -> registry.removeClusteringInformation(KEY)) - .onSuccess(v -> context.verify(context::completeNow)) - .onFailure(context::failNow); + .onComplete(context.succeedingThenComplete()); } static class TestClusterEntityRegistry extends ClusterEntityRegistry {