diff --git a/src/testcases/org/apache/tools/ant/types/AssertionsTest.java b/src/testcases/org/apache/tools/ant/types/AssertionsTest.java index bd3610874..e2e8ac302 100644 --- a/src/testcases/org/apache/tools/ant/types/AssertionsTest.java +++ b/src/testcases/org/apache/tools/ant/types/AssertionsTest.java @@ -85,6 +85,9 @@ public class AssertionsTest extends BuildFileTest { } public void testNofork() { + if (AssertionsTest.class.desiredAssertionStatus()) { + return; // ran Ant tests with -ea and this would fail spuriously + } expectLogContaining("test-nofork", "Assertion statements are currently ignored in non-forked mode"); }