Fix incomplete AssertJ assertions
Closes gh-30743
This commit is contained in:
@@ -264,10 +264,10 @@ class JUnitJupiterApplicationEventsIntegrationTests {
|
||||
context.publishEvent(new CustomEvent("sync"));
|
||||
|
||||
Awaitility.await().atMost(Durations.ONE_SECOND)
|
||||
.untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.singleElement()
|
||||
.extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING)
|
||||
.isEqualTo("sync")));
|
||||
.isEqualTo("sync"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ public class JUnit4ApplicationEventsAsyncIntegrationTests {
|
||||
context.publishEvent(new CustomEvent("sync"));
|
||||
|
||||
Awaitility.await().atMost(Durations.ONE_SECOND)
|
||||
.untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.singleElement()
|
||||
.extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING)
|
||||
.isEqualTo("sync")));
|
||||
.isEqualTo("sync"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ class TestNGApplicationEventsAsyncIntegrationTests extends AbstractTestNGSpringC
|
||||
context.publishEvent(new CustomEvent("asyncConsumption"));
|
||||
|
||||
Awaitility.await().atMost(Durations.ONE_SECOND)
|
||||
.untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class))
|
||||
.singleElement()
|
||||
.extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING)
|
||||
.isEqualTo("asyncConsumption")));
|
||||
.isEqualTo("asyncConsumption"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user