Skip to content

Commit db7ff44

Browse files
authored
Merge pull request #14 from reportportal/develop
Release
2 parents 19585f0 + 6e4dc89 commit db7ff44

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/epam/reportportal/util/test/CommonUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ public static ExecutorService testExecutor() {
4040
}
4141

4242
public static void shutdownExecutorService(ExecutorService executor) {
43+
if (executor == null || executor.isShutdown()) {
44+
return;
45+
}
4346
executor.shutdown();
4447
try {
4548
if (!executor.awaitTermination(10, TimeUnit.SECONDS)) {
4649
executor.shutdownNow();
4750
}
4851
} catch (InterruptedException ignore) {
52+
executor.shutdownNow();
4953
}
5054
}
5155

0 commit comments

Comments
 (0)