Github user sihuazhou commented on a diff in the pull request:
https://github.com/apache/flink/pull/5881#discussion_r183267016
--- Diff:
flink-yarn/src/test/java/org/apache/flink/yarn/YarnResourceManagerTest.java ---
@@ -388,4 +390,108 @@ public void testStopWorker() throws Exception {
assertTrue(resourceManager.getNumberOfRegisteredTaskManagers().get() == 0);
}};
}
+
+ /**
+ * Tests the case that containers are killed before registering with
ResourceManager successfully.
+ */
+ @Test
+ public void testKillContainerBeforeTMRegisterSuccessfully() throws
Exception {
--- End diff --
Hmm...most code of this test is mirror from an another test
`testStopWorker()` in this class. I agreed that itâs a bit complicated but
it's logical could ensure that we can test the corner situation properly (the
container is killed before registering successfully). TBH, I don't know how to
make sure this the corner situation can be test, I think I'm a bit fool here...
could you give me some more detail advice?
---