Skip to content

Commit 3525c27

Browse files
java17
1 parent c41208d commit 3525c27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/java/io/appium/java_client/utils/GitHubReleaseFetcherTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ public void testConcurrentAccessWithSameUrl() throws Exception {
169169
fetcher.clearCache();
170170

171171
int numberOfThreads = 5;
172-
try (ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads)) {
172+
ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads);
173+
try {
173174
CountDownLatch latch = new CountDownLatch(numberOfThreads);
174175
List<Future<Path>> futures = new ArrayList<>();
175176

@@ -203,6 +204,8 @@ public void testConcurrentAccessWithSameUrl() throws Exception {
203204
for (Path result : results) {
204205
assertEquals(firstResult, result, "All concurrent fetchers should return the same cached file path");
205206
}
207+
} finally {
208+
executor.shutdown();
206209
}
207210
}
208211
}

0 commit comments

Comments
 (0)