smiklosovic commented on code in PR #4691:
URL: https://github.com/apache/cassandra/pull/4691#discussion_r2991031784
##########
test/unit/org/apache/cassandra/utils/JVMStabilityInspectorTest.java:
##########
@@ -239,4 +240,94 @@ public void fileHandleTest()
JVMStabilityInspector.replaceKiller(originalKiller);
}
}
+
+ @Test
+ public void testShutdownHookNotRemovedForNonFatalOom() throws Exception
Review Comment:
these two test methods are 95% same. All it differs on is message in that
exception and assertion if it should remove shutdown hook or not. Could you do
a helper method which encapsulates it all with appropriate parameters to pass
to it so the actual test methods will be effectively one-liners?
You could also make `FORCE_HEAP_OOM_IGNORE_SET` public and take its first
value to test no a real value which will be used in production. If we ever
change it in `JVMStabilityInspector` but not here we will not be testing
anything "real".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]