You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "t-rana (via GitHub)" <gi...@apache.org> on 2024/06/21 14:28:36 UTC
Re: [PR] OAK-10904: change token refresh executor to use daemon thread [jackrabbit-oak]
t-rana commented on code in PR #1545:
URL: https://github.com/apache/jackrabbit-oak/pull/1545#discussion_r1648425265
##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureUtilities.java:
##########
@@ -74,7 +74,12 @@ public final class AzureUtilities {
private static final long TOKEN_REFRESHER_DELAY = 1L;
private static final Logger log = LoggerFactory.getLogger(AzureUtilities.class);
- private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
+
+ private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(runnable -> {
Review Comment:
> Not closing it properly could cause random issues in tests for example
I did not face any issues in the test suite run, can you please elaborate so that I can handle the same? I guess the framework running test terminates the JVM and shutdown method is executed which will close this exectuor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org