Package javax.tools.diagnostics.runtime.java

Examples of javax.tools.diagnostics.runtime.java.JavaMonitor


    assertNotNull("JavaMonitor.getID() for 0-1-1 is null.", monitor.getID());
  }

  public void testGetName_0_1_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor) setup.findMonitorThreadConfig(0, 1, 1).getMonitor();
    assertNotNull("JavaMonitor.getName() for 0-1-1 is null.", monitor
        .getName());
  }
View Full Code Here


    assertNotNull("JavaMonitor.getName() for 0-1-1 is null.", monitor
        .getName());
  }

  public void testCountWaiters_0_1_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor) setup.findMonitorThreadConfig(0, 1, 1).getMonitor();
    int count = 0;
    Iterator waiters = monitor.getNotifyWaiters().iterator();

    while (waiters.hasNext()) {
      Object next = waiters.next();
      count++;
    }
View Full Code Here

    assertEquals("Waiters count incorrect :" + count, 0, count);
  }

  public void testCountEnters_0_1_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor) setup.findMonitorThreadConfig(0, 1, 1).getMonitor();
    int count = 0;
    Iterator enters = monitor.getEnterWaiters().iterator();

    while (enters.hasNext()) {
      Object next = enters.next();
      count++;
    }
View Full Code Here

    assertNotNull("Owner count incorrect", owner);
  }

  public void testNameWaiters_0_1_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor) setup.findMonitorThreadConfig(0, 1, 1).getMonitor();
    int count = 0;
    Iterator waiters = monitor.getNotifyWaiters().iterator();

    while (waiters.hasNext()) {
      JavaThread next = (JavaThread) waiters.next();
      assertEquals("Waiters name incorrect", generatePrefix(0, 1, 1)
          + "-" + SetupJavaMonitor_ObjectMonitors.monitorNotifyThreadName + "-" + count, next
View Full Code Here

      count++;
    }
  }

  public void testNameOwners_0_1_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor)setup.findMonitorThreadConfig(0, 1, 1).getMonitor();
    JavaThread owner = monitor.getOwner();

    assertEquals("Owner name incorrect", generatePrefix(0, 1, 1) + "-"
        + SetupJavaMonitor_ObjectMonitors.monitorOwnerThreadName + "-0", owner.getName());
  }
View Full Code Here

  }
 
  ///////////////////////////////////////////

  public void testFindMonitor_0_0_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor) setup.findMonitorThreadConfig(0, 0, 1).getMonitor();

    assertNotNull("Couldn't find 0-1-1", monitor);
  }
View Full Code Here

    assertNotNull("Couldn't find 0-1-1", monitor);
  }

  public void testGetID_0_0_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor)setup.findMonitorThreadConfig(0, 0, 1).getMonitor();

    assertNotNull("JavaMonitor.getID() for 0-1-1 is null.", monitor.getID());
  }
View Full Code Here

    assertNotNull("JavaMonitor.getID() for 0-1-1 is null.", monitor.getID());
  }

  public void testGetName_0_0_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor)setup.findMonitorThreadConfig(0, 0, 1).getMonitor();
    assertNotNull("JavaMonitor.getName() for 0-1-1 is null.", monitor
        .getName());
  }
View Full Code Here

    assertNotNull("JavaMonitor.getName() for 0-1-1 is null.", monitor
        .getName());
  }

  public void testCountWaiters_0_0_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor)setup.findMonitorThreadConfig(0, 0, 1).getMonitor();
    int count = 0;
    Iterator waiters = monitor.getNotifyWaiters().iterator();

    while (waiters.hasNext()) {
      Object next = waiters.next();
      count++;
    }
View Full Code Here

    assertEquals("Waiters count incorrect :" + count, 0, count);
  }

  public void testCountEnters_0_0_1() throws Exception {
    JavaMonitor monitor = (JavaMonitor)setup.findMonitorThreadConfig(0, 0, 1).getMonitor();
    int count = 0;
    Iterator enters = monitor.getEnterWaiters().iterator();

    while (enters.hasNext()) {
      Object next = enters.next();
      count++;
    }
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.runtime.java.JavaMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.