wanglijie95 commented on a change in pull request #12181:
URL: https://github.com/apache/flink/pull/12181#discussion_r427831205



##########
File path: 
flink-core/src/test/java/org/apache/flink/core/fs/SafetyNetCloseableRegistryTest.java
##########
@@ -198,4 +198,29 @@ public void testReaperThreadSpawnAndStop() throws 
Exception {
                }
                
Assert.assertFalse(SafetyNetCloseableRegistry.isReaperThreadRunning());
        }
+
+       /**
+        * Test whether failure to start thread in {@link 
SafetyNetCloseableRegistry}
+        * constructor can lead to failure of subsequent state check.
+        */
+       @Test
+       public void testReaperThreadStartFailed() throws Exception {
+
+               try {
+                       new SafetyNetCloseableRegistry(() -> new 
OutOfMemoryReaperThread());
+               } catch (java.lang.OutOfMemoryError error) {
+               }
+

Review comment:
       OK, I will add the check.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to