Skip to content

Commit a1e4a4b

Browse files
fix: update the pubsub fake executor to cancel a pending callables future when cancelled
1 parent 6a667fc commit a1e4a4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ public int compareTo(Delayed o) {
258258
@Override
259259
public boolean cancel(boolean mayInterruptIfRunning) {
260260
synchronized (this) {
261+
future.cancel(mayInterruptIfRunning);
261262
cancelled.set(true);
262263
return !done.get();
263264
}

0 commit comments

Comments
 (0)