Skip to content

Commit

Permalink
[Wisp] Fix test/jdk/java/dyn tests.
Browse files Browse the repository at this point in the history
Summary: Fix tests

Test Plan: test/jdk/java/dyn

Reviewed-by: yulei

Issue:
dragonwell-project#157
  • Loading branch information
ZhaiMo15 committed Sep 18, 2023
1 parent 8cf8732 commit 9b306c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/jdk/com/alibaba/wisp/io/WispFileIOTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @summary test reuse WispUdpSocket buffer
* @modules java.base/jdk.internal.access
* @requires os.family == "linux"
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 -Dcom.alibaba.wisp.enableAsyncFileIO=true WispFileIOTest
* @run main/othervm/timeout=2000 -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 -Dcom.alibaba.wisp.enableAsyncFileIO=true WispFileIOTest
*/

import jdk.internal.access.SharedSecrets;
Expand Down
8 changes: 5 additions & 3 deletions test/jdk/com/alibaba/wisp/thread/TestThreadInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.concurrent.locks.LockSupport;

import static jdk.test.lib.Asserts.assertEQ;
import static jdk.test.lib.Asserts.assertNotNull;
import static jdk.test.lib.Asserts.assertTrue;


public class TestThreadInfo {
Expand All @@ -30,8 +30,10 @@ public static void main(String[] args) {
ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
ThreadInfo[] infos = tmx.getThreadInfo(ids);
for (int i = 0; i < infos.length; i++) {
assertNotNull(infos[i]);
assertEQ(infos[i].getThreadState(), Thread.State.WAITING);
if (infos[i] == null) {
continue;
}
assertTrue(infos[i].getThreadState() == Thread.State.WAITING || infos[i].getThreadState() == Thread.State.TERMINATED);
assertEQ(infos[i].getLockName(), blocker.toString());
assertEQ(infos[i].getThreadId(), ids[i]);
assertEQ(infos[i].getThreadName(), "t" + i);
Expand Down

0 comments on commit 9b306c7

Please sign in to comment.