From ba9188032bfeefa0cb1b5500bf392f1792d4bf18 Mon Sep 17 00:00:00 2001 From: Jacek Poreda Date: Tue, 22 Aug 2023 11:53:04 +0200 Subject: [PATCH] SONAR-19678 Fix flaky `all_processes_are_stopped_if_one_process_goes_down` --- .../src/main/java/org/sonar/application/SchedulerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java index ca6fe276c4b..b3c1e5c76ac 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java +++ b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java @@ -255,12 +255,13 @@ public class SchedulerImpl implements Scheduler, ManagedProcessEventListener, Pr private void hardStopImpl() { try { hardStopAll(); - finalizeStop(); } catch (InterruptedException e) { // ignore and assume SQ stop is handled by another thread LOG.debug("Stopping all processes was interrupted in the middle of a hard stop" + " (current thread name is \"{}\")", Thread.currentThread().getName()); Thread.currentThread().interrupt(); + } finally { + finalizeStop(); } } -- 2.39.5