File tree Expand file tree Collapse file tree
e2e/core-e2e/src/test/java/io/flamingock/core/e2e Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ void testDependencyInjectionInRollbackForNonTxChange() {
234234
235235 Counter counter = new Counter ();
236236
237- NonTransactionalTargetSystem targetSystem = new NonTransactionalTargetSystem ( "kafka" )
237+ NonTransactionalTargetSystem targetSystem = new NonTransactionalTargetSystem ("kafka" )
238238 .addDependency (counter );
239239
240240 try (MockedStatic <Deserializer > mocked = Mockito .mockStatic (Deserializer .class )) {
@@ -244,14 +244,15 @@ void testDependencyInjectionInRollbackForNonTxChange() {
244244 )
245245 );
246246
247- try {
247+ PipelineExecutionException exception = assertThrows ( PipelineExecutionException . class , () -> {
248248 testKit .createBuilder ()
249249 .addTargetSystem (targetSystem )
250250 .build ()
251251 .run ();
252- } catch (PipelineExecutionException e ) {
253- // Exception is expected, do not fail the test
254- }
252+ });
253+
254+ assertNotNull (exception );
255+ assertTrue (exception .getMessage ().contains ("Intentional failure" ));
255256 }
256257
257258 assertTrue (counter .isExecuted (), "Counter.executed should be true after execution" );
You can’t perform that action at this time.
0 commit comments