Skip to content

Commit

Permalink
Don't isolate, remove GC
Browse files Browse the repository at this point in the history
  • Loading branch information
skeet70 committed Aug 6, 2024
1 parent 0096b7b commit 2319190
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
minimum_coverage: "0"
additional_system_deps: "libjna-java"
cargo_command_env_vars: "PATH=$JAVA_HOME_21_X64/bin:$PATH CLASSPATH=/usr/share/java/jna.jar"
cargo_command_test_args: "test_cancel_delay_fixtures"
# cargo_command_test_args: "test_cancel_delay_fixtures"
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,13 @@ public CompletableFuture<Void> tryDelay(String delayMs) {
var completedDelaysBefore = traitObj.completedDelays;
System.out.println("Calling for cancel_delay from Java: " + System.nanoTime());
Futures.cancelDelayUsingTrait(traitObj, 10).get();
System.gc();
// sleep long enough so that the `delay()` call would finish if it wasn't cancelled.
TestFixtureCancelDelay.delay(100).get();
// If the task was cancelled, then completedDelays won't have increased
assert traitObj.completedDelays == completedDelaysBefore : MessageFormat.format("{0} current delays != {1} delays before", traitObj.completedDelays, completedDelaysBefore);

// Test that all handles were cleaned up
// TODO(murph): this is inconsistently failing in CI, touch
System.gc();
var endingHandleCount = UniffiAsyncHelpers.uniffiForeignFutureHandleCount();
assert endingHandleCount == 0 : MessageFormat.format("{0} current handle count != 0", endingHandleCount);
}
Expand Down

0 comments on commit 2319190

Please sign in to comment.