< prev index next >

test/com/sun/jdi/InterruptHangTest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.sun.jdi.*;
  25 import com.sun.jdi.event.*;
  26 import com.sun.jdi.request.*;
  27 
  28 /**
  29  *  @test
  30  *  @bug 6459476
  31  *  @summary Debuggee is blocked,  looks like running
  32  *
  33  *  @author jjh
  34  *
  35  *  @modules jdk.jdi
  36  *  @run build TestScaffold VMConnection TargetListener TargetAdapter
  37  *  @run compile -g InterruptHangTest.java
  38  *  @run driver InterruptHangTest
  39  */
  40 
  41 /**
  42  * Debuggee has two threads.  Debugger keeps stepping in
  43  * the first thread.  The second thread keeps interrupting the first
  44  * thread.  If a long time goes by with the debugger not getting
  45  * a step event, the test fails.
  46  */
  47 class InterruptHangTarg {
  48     public static String sync = "sync";
  49     public static void main(String[] args){
  50         int answer = 0;
  51         System.out.println("Howdy!");
  52         Interruptor interruptorThread = new Interruptor(Thread.currentThread());
  53 
  54         synchronized(sync) {
  55             interruptorThread.start();




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.sun.jdi.*;
  25 import com.sun.jdi.event.*;
  26 import com.sun.jdi.request.*;
  27 
  28 /**
  29  * @test
  30  * @bug 6459476
  31  * @summary Debuggee is blocked,  looks like running

  32  * @author jjh
  33  *

  34  * @run build TestScaffold VMConnection TargetListener TargetAdapter
  35  * @run compile -g InterruptHangTest.java
  36  * @run driver InterruptHangTest
  37  */
  38 
  39 /**
  40  * Debuggee has two threads.  Debugger keeps stepping in
  41  * the first thread.  The second thread keeps interrupting the first
  42  * thread.  If a long time goes by with the debugger not getting
  43  * a step event, the test fails.
  44  */
  45 class InterruptHangTarg {
  46     public static String sync = "sync";
  47     public static void main(String[] args){
  48         int answer = 0;
  49         System.out.println("Howdy!");
  50         Interruptor interruptorThread = new Interruptor(Thread.currentThread());
  51 
  52         synchronized(sync) {
  53             interruptorThread.start();


< prev index next >