@@ -296,6 +296,45 @@ public void testJupiterEngineWithFailureInTestTemplateProvider() {
296
296
.assertContainsText ("Encountered failure in TestTemplate provideTestTemplateInvocationContexts()" );
297
297
}
298
298
299
+ @ Test
300
+ public void testJupiterEngineWithTestTemplateNotClassifiedAsFlake () {
301
+ unpack ("junit5-testtemplate-bug" , "-" + jupiter )
302
+ .setTestToRun ("FieldSettingTest" )
303
+ .sysProp ("junit5.version" , jupiter )
304
+ .maven ()
305
+ .withFailure ()
306
+ .executeTest ()
307
+ .verifyTextInLog ("AssertionFailedError" )
308
+ .assertTestSuiteResults (2 , 0 , 1 , 0 , 0 );
309
+
310
+ unpack ("junit5-testtemplate-bug" , "-" + jupiter )
311
+ .debugLogging ()
312
+ .setTestToRun ("FieldSettingTest" )
313
+ .sysProp ("junit5.version" , jupiter )
314
+ // The tests are failing deterministically, so rerunning them should not change the result
315
+ .sysProp ("surefire.rerunFailingTestsCount" , "1" )
316
+ .maven ()
317
+ .withFailure ()
318
+ .executeTest ()
319
+ .verifyTextInLog ("AssertionFailedError" )
320
+ .assertTestSuiteResults (2 , 0 , 1 , 0 , 0 );
321
+ }
322
+
323
+ @ Test
324
+ public void testJupiterEngineWithParameterizedTestsNotClassifiedAsFlake () {
325
+ unpack ("junit5-testtemplate-bug" , "-" + jupiter )
326
+ .debugLogging ()
327
+ .setTestToRun ("ParamsContextTest" )
328
+ .sysProp ("junit5.version" , jupiter )
329
+ // The tests are failing deterministically, so rerunning them should not change the result
330
+ .sysProp ("surefire.rerunFailingTestsCount" , "1" )
331
+ .maven ()
332
+ .withFailure ()
333
+ .executeTest ()
334
+ .verifyTextInLog ("AssertionFailedError" )
335
+ .assertTestSuiteResults (2 , 0 , 1 , 0 , 0 );
336
+ }
337
+
299
338
@ Test
300
339
public void testJupiterEngineWithAssertionsFailNoParameters () {
301
340
// `Assertions.fail()` not supported until 5.2.0
0 commit comments