src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java
changeset 51436 091c0d22e735
parent 50858 2d3e99a72541
child 52910 583fd71c47d6
equal deleted inserted replaced
51435:72c82bd05971 51436:091c0d22e735
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25 
    25 
    26 
    26 
    27 package org.graalvm.compiler.jtt.threads;
    27 package org.graalvm.compiler.jtt.threads;
    28 
    28 
    29 import org.graalvm.compiler.jtt.JTTTest;
    29 import org.graalvm.compiler.jtt.JTTTest;
    30 import org.graalvm.compiler.jtt.hotspot.NotOnDebug;
       
    31 import org.junit.Rule;
    30 import org.junit.Rule;
    32 import org.junit.Test;
    31 import org.junit.Test;
    33 import org.junit.rules.TestRule;
    32 import org.junit.rules.TestRule;
    34 import org.junit.rules.Timeout;
       
    35 
    33 
    36 public class Object_wait01 extends JTTTest {
    34 public class Object_wait01 extends JTTTest {
    37 
    35 
    38     @Rule public TestRule timeout = NotOnDebug.create(Timeout.seconds(20));
    36     @Rule public TestRule timeout = createTimeoutSeconds(20);
    39 
    37 
    40     private static class TestClass implements Runnable {
    38     private static class TestClass implements Runnable {
    41         @Override
    39         @Override
    42         public void run() {
    40         public void run() {
    43             int i = 0;
    41             int i = 0;
    67         }
    65         }
    68     }
    66     }
    69 
    67 
    70     @Test
    68     @Test
    71     public void run0() throws Throwable {
    69     public void run0() throws Throwable {
    72         initializeForTimeout();
       
    73         runTest("test", 0);
    70         runTest("test", 0);
    74     }
    71     }
    75 
    72 
    76     @Test
    73     @Test
    77     public void run1() throws Throwable {
    74     public void run1() throws Throwable {
    78         initializeForTimeout();
       
    79         runTest("test", 1);
    75         runTest("test", 1);
    80     }
    76     }
    81 
    77 
    82     @Test
    78     @Test
    83     public void run2() throws Throwable {
    79     public void run2() throws Throwable {
    84         initializeForTimeout();
       
    85         runTest("test", 3);
    80         runTest("test", 3);
    86     }
    81     }
    87 
    82 
    88     @Test
    83     @Test
    89     public void run3() throws Throwable {
    84     public void run3() throws Throwable {
    90         initializeForTimeout();
       
    91         runTest("test", 15);
    85         runTest("test", 15);
    92     }
    86     }
    93 
    87 
    94 }
    88 }