Skip to content

Commit

Permalink
Fix alluxio.util.executor.UniqueBlockingQueueTest.concurrentTest fail
Browse files Browse the repository at this point in the history
  • Loading branch information
顾鹏 authored and 顾鹏 committed Aug 2, 2024
1 parent f3cf054 commit bef5f0a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
* Tests the {@link UniqueBlockingQueue}.
Expand Down Expand Up @@ -51,6 +52,14 @@ public void concurrentTest() throws Exception {
});
}
executor.shutdown();
try {
if (!executor.awaitTermination(60, TimeUnit.SECONDS)) {
executor.shutdownNow();
}
} catch (InterruptedException e) {
executor.shutdownNow();
Thread.currentThread().interrupt();
}
assertEquals(20, test.size());
}
}

0 comments on commit bef5f0a

Please sign in to comment.