Skip to content

Commit 2cc5311

Browse files
committed
fixup! Yield worker lease when blocking thread can continue
1 parent 8cf7f47 commit 2cc5311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ConcurrentHierarchicalTestExecutorService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ ConcurrentHierarchicalTestExecutorService executor() {
221221

222222
void processQueueEntries(WorkerLease workerLease, BooleanSupplier doneCondition) {
223223
this.workerLease = workerLease;
224-
this.doneCondition = doneCondition;
225224
while (!threadPool.isShutdown()) {
226225
if (doneCondition.getAsBoolean()) {
227226
LOGGER.trace(() -> "yielding resource lock");
@@ -306,7 +305,8 @@ else if (child.getExecutionMode() == SAME_THREAD) {
306305
private Map<WorkStealResult, List<WorkQueue.Entry>> tryToStealWorkWithoutBlocking(
307306
List<WorkQueue.Entry> forkedChildren) {
308307

309-
Map<WorkStealResult, List<WorkQueue.Entry>> queueEntriesByResult = new HashMap<>(WorkStealResult.values().length);
308+
Map<WorkStealResult, List<WorkQueue.Entry>> queueEntriesByResult = new HashMap<>(
309+
WorkStealResult.values().length);
310310
if (!forkedChildren.isEmpty()) {
311311
forkedChildren.sort(reverseOrder());
312312
tryToStealWork(forkedChildren, BlockingMode.NON_BLOCKING, queueEntriesByResult);

0 commit comments

Comments
 (0)