Skip to content

Commit

Permalink
Merge pull request #5868 from halibobo1205/feat/backup_thead_pool_clo…
Browse files Browse the repository at this point in the history
…se_opt

fix(backup): make SR node with backup exit normally by kill -15
  • Loading branch information
lvs007 authored Jul 1, 2024
2 parents 2df311a + 6550dfb commit 143a456
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 143a456

Please sign in to comment.