Skip to content

Commit

Permalink
Fix worker stopping in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gianm committed Jul 30, 2024
1 parent f9f9321 commit ac49b8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public ListenableFuture<Void> cancelTask(String workerId)
{
final Worker worker = inMemoryWorkers.remove(workerId);
if (worker != null) {
worker.stop();
worker.awaitStop();
}
return Futures.immediateFuture(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ public ListenableFuture<Boolean> fetchChannelData(
@Override
public void close()
{
inMemoryWorkers.forEach((k, v) -> v.awaitStop());
inMemoryWorkers.forEach((k, v) -> {
v.stop();
v.awaitStop();
});
}
}

0 comments on commit ac49b8e

Please sign in to comment.