Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3394#discussion_r106502004
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotProtocolTest.java
 ---
    @@ -68,115 +52,79 @@
     
     public class SlotProtocolTest extends TestLogger {
     
    -   private static TestingSerialRpcService testRpcService;
    +   private static ScheduledExecutorService scheduledExecutorService;
     
        @BeforeClass
        public static void beforeClass() {
    -           testRpcService = new TestingSerialRpcService();
    +           scheduledExecutorService = new ScheduledThreadPoolExecutor(1);
        }
     
        @AfterClass
        public static void afterClass() {
    -           testRpcService.stopService();
    -           testRpcService = null;
    -   }
    +           scheduledExecutorService.shutdown();
    +
    +           if (!scheduledExecutorService.isTerminated()) {
    +                   List<Runnable> runnables = 
scheduledExecutorService.shutdownNow();
     
    -   @Before
    -   public void beforeTest(){
    -           testRpcService.clearGateways();
    +                   for (Runnable runnable : runnables) {
    +                           runnable.run();
    --- End diff --
    
    Curious: Do we really want these to run after all tests are already 
complete?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to