Skip to content

Commit 33b3e98

Browse files
committed
fix: use cache sync timeout instead of termination one
1 parent 5e9377a commit 33b3e98

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public static void executeAndWaitForCompletion(Runnable task, String threadNameP
8686
final var name = thread.getName();
8787
try {
8888
thread.setName(threadNamePrefix + "-" + thread.getId());
89-
instrumented.submit(task).get(instance().terminationTimeoutSeconds, TimeUnit.SECONDS);
89+
instrumented.submit(task)
90+
.get(ConfigurationServiceProvider.instance().cacheSyncTimeout().toSeconds(),
91+
TimeUnit.SECONDS);
9092
shutdown(instrumented);
9193
} catch (InterruptedException | ExecutionException | TimeoutException e) {
9294
throw new OperatorException("Couldn't execute task", e);

0 commit comments

Comments
 (0)