You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-java/snakeyaml/files/snakeyaml-1.30-fix-test-che...

19 lines
664 B

--- a/src/test/java/org/yaml/snakeyaml/issues/issue377/BillionLaughsAttackTest.java
+++ b/src/test/java/org/yaml/snakeyaml/issues/issue377/BillionLaughsAttackTest.java
@@ -69,7 +69,7 @@ public class BillionLaughsAttackTest {
map.toString();
fail("Expected overflow");
} catch (Throwable e) {
- assertTrue(e.getMessage().contains("heap"));
+ assertTrue("Catched exception " + e + " is not an instance of OutOfMemoryError", e instanceof OutOfMemoryError);
}
}
@@ -94,4 +94,4 @@ public class BillionLaughsAttackTest {
assertNotNull(map);
}
-}
\ No newline at end of file
+}