Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Oct 24, 2024
1 parent 363eb0a commit 882df34
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void gossip_distinctMessages() {
}

@Test
public void gossip_returnCompletedFutureEvenIfFails() {
public void gossip_forwardsGossipFailures() {
final Bytes message = Bytes.fromHexString("0x01");
final SafeFuture<Unit> result = new SafeFuture<>();
when(publisher.publish(any(), any())).thenReturn(result);
Expand All @@ -131,7 +131,7 @@ public void gossip_returnCompletedFutureEvenIfFails() {
assertThat(gossipResult).isNotCompleted();

result.completeExceptionally(new RuntimeException("Failed to gossip"));
assertThat(gossipResult).isCompleted();
assertThat(gossipResult).isCompletedExceptionally();
}

@Test
Expand Down

0 comments on commit 882df34

Please sign in to comment.