We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19585f0 + 6e4dc89 commit db7ff44Copy full SHA for db7ff44
src/main/java/com/epam/reportportal/util/test/CommonUtils.java
@@ -40,12 +40,16 @@ public static ExecutorService testExecutor() {
40
}
41
42
public static void shutdownExecutorService(ExecutorService executor) {
43
+ if (executor == null || executor.isShutdown()) {
44
+ return;
45
+ }
46
executor.shutdown();
47
try {
48
if (!executor.awaitTermination(10, TimeUnit.SECONDS)) {
49
executor.shutdownNow();
50
51
} catch (InterruptedException ignore) {
52
+ executor.shutdownNow();
53
54
55
0 commit comments