Skip to content

Commit

Permalink
fix(backup/backupServer): make the thread pool close after the netty …
Browse files Browse the repository at this point in the history
…channel closes
  • Loading branch information
halibobo1205 committed Jun 20, 2024
1 parent d383177 commit 6550dfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public void initChannel(NioDatagramChannel ch)
public void close() {
logger.info("Closing backup server...");
shutdown = true;
ExecutorServiceManager.shutdownAndAwaitTermination(executor, name);
backupManager.stop();
if (channel != null) {
try {
Expand All @@ -104,6 +103,7 @@ public void close() {
logger.warn("Closing backup server failed.", e);
}
}
ExecutorServiceManager.shutdownAndAwaitTermination(executor, name);
logger.info("Backup server closed.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ public void tearDown() {
Args.clearParam();
}

@Test
@Test(timeout = 60_000)
public void test() throws InterruptedException {
backupServer.initServer();
// wait for the server to start
Thread.sleep(1000);
}
}

0 comments on commit 6550dfb

Please sign in to comment.