Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8268131: 2 java/foreign tests timed out
Reviewed-by: dcubed
  • Loading branch information
mcimadamore committed Jun 3, 2021
1 parent 5405f98 commit 52d8215
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/jdk/java/foreign/TestDowncall.java
Expand Up @@ -28,7 +28,7 @@
* @modules jdk.incubator.foreign/jdk.internal.foreign
* @build NativeTestHelper CallGeneratorHelper TestDowncall
*
* @run testng/othervm
* @run testng/othervm/timeout=240
* --enable-native-access=ALL-UNNAMED
* TestDowncall
*/
Expand Down
9 changes: 8 additions & 1 deletion test/jdk/java/foreign/TestResourceScope.java
Expand Up @@ -127,7 +127,14 @@ public void testSharedMultiThread(Supplier<Cleaner> cleanerSupplier) {
// if no cleaner, close - not all segments might have been added to the scope!
// if cleaner, don't unset the scope - after all, the scope is kept alive by threads
if (cleaner == null) {
scope.close();
while (true) {
try {
scope.close();
break;
} catch (IllegalStateException ise) {
// scope is acquired (by add) - wait some more
}
}
}

threads.forEach(t -> {
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/foreign/TestUpcall.java
Expand Up @@ -28,7 +28,7 @@
* @modules jdk.incubator.foreign/jdk.internal.foreign
* @build NativeTestHelper CallGeneratorHelper TestUpcall
*
* @run testng/othervm
* @run testng/othervm/timeout=240
* --enable-native-access=ALL-UNNAMED
* TestUpcall
*/
Expand Down

1 comment on commit 52d8215

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.