Skip to content

Commit 52d8215

Browse files
committedJun 3, 2021
8268131: 2 java/foreign tests timed out
Reviewed-by: dcubed
1 parent 5405f98 commit 52d8215

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
 

‎test/jdk/java/foreign/TestDowncall.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @modules jdk.incubator.foreign/jdk.internal.foreign
2929
* @build NativeTestHelper CallGeneratorHelper TestDowncall
3030
*
31-
* @run testng/othervm
31+
* @run testng/othervm/timeout=240
3232
* --enable-native-access=ALL-UNNAMED
3333
* TestDowncall
3434
*/

‎test/jdk/java/foreign/TestResourceScope.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ public void testSharedMultiThread(Supplier<Cleaner> cleanerSupplier) {
127127
// if no cleaner, close - not all segments might have been added to the scope!
128128
// if cleaner, don't unset the scope - after all, the scope is kept alive by threads
129129
if (cleaner == null) {
130-
scope.close();
130+
while (true) {
131+
try {
132+
scope.close();
133+
break;
134+
} catch (IllegalStateException ise) {
135+
// scope is acquired (by add) - wait some more
136+
}
137+
}
131138
}
132139

133140
threads.forEach(t -> {

‎test/jdk/java/foreign/TestUpcall.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @modules jdk.incubator.foreign/jdk.internal.foreign
2929
* @build NativeTestHelper CallGeneratorHelper TestUpcall
3030
*
31-
* @run testng/othervm
31+
* @run testng/othervm/timeout=240
3232
* --enable-native-access=ALL-UNNAMED
3333
* TestUpcall
3434
*/

0 commit comments

Comments
 (0)
Please sign in to comment.