Skip to content

Commit 7b21edd

Browse files
csviriCopilot
andcommitted
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent dbe3e98 commit 7b21edd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ExecutorServiceManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ public synchronized void stop(Duration gracefulShutdownTimeout) {
161161
// silently leaving the manager with already terminated executors
162162
parallelExec.shutdownNow();
163163
workflowExecutor = null;
164-
scheduledExecutorService = null;
165164
started = false;
166165
}
167166
}

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/api/config/ExecutorServiceManagerTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ void stopShutsDownTheScheduledExecutorService() {
3030
ConfigurationService configurationService = new BaseConfigurationService();
3131
var manager = configurationService.getExecutorServiceManager();
3232
var scheduled = manager.scheduledExecutorService();
33-
assertThat(scheduled.isShutdown()).isFalse();
3433

35-
manager.stop(SHUTDOWN_TIMEOUT);
34+
try {
35+
assertThat(scheduled.isShutdown()).isFalse();
36+
} finally {
37+
manager.stop(SHUTDOWN_TIMEOUT);
38+
}
3639

3740
assertThat(scheduled.isShutdown()).isTrue();
3841
}

0 commit comments

Comments
 (0)