use of org.junit.platform.testkit.engine.Events in project spring-framework by spring-projects.
the class TimedTransactionalSpringExtensionTests method springTransactionsWorkWithJUnitJupiterTimeouts.
@Test
void springTransactionsWorkWithJUnitJupiterTimeouts() {
Events events = EngineTestKit.engine("junit-jupiter").selectors(selectClass(TestCase.class)).execute().testEvents().assertStatistics(stats -> stats.started(4).succeeded(2).failed(2));
events.failed().assertThatEvents().haveExactly(2, event(test("WithExceededJUnitJupiterTimeout"), finishedWithFailure(instanceOf(TimeoutException.class), message(msg -> msg.endsWith("timed out after 10 milliseconds")))));
}
Aggregations