Skip to content

Commit f7ef376

Browse files
BAEL-639: Guide to Guava's EventBus Tests - adding sleep
1 parent 9135c60 commit f7ef376

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎guava/src/test/java/org/baeldung/guava/GuavaEventBusTest.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ public void givenCustomEvent_whenEventHandled_thenSuccess() {
4444
}
4545

4646
@Test
47-
public void givenUnSubscribedEvent_whenEventHandledByDeadEvent_thenSuccess() {
47+
public void givenUnSubscribedEvent_whenEventHandledByDeadEvent_thenSuccess() throws InterruptedException {
4848
listener.resetEventsHandled();
4949

5050
eventBus.post(12345);
51+
Thread.sleep(1000);
52+
5153
assertEquals(1, listener.getEventsHandled());
5254
}
5355

0 commit comments

Comments
 (0)