Examples of runTestRunnables()


Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

      conf.set(Constants.PEER_PORT, String.valueOf(30000 + i));
      threads[i] = new BSPPeerThread(conf);
    }

    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(threads);
    mttr.runTestRunnables();
  }

  @Override
  public void process(WatchedEvent event) {
  }
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    }

    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);

    long start = System.nanoTime();
    mttr.runTestRunnables(40000L); // max runtime 40s
    log.info("Runtime: {} ns", (System.nanoTime() - start));

    for (TestRunnable r : trs) {
      ConnectionWorker wkr = (ConnectionWorker) r;
      String name = (wkr.getName());
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

      trs[t] = new ScopeClientWorker(t, app, room);
    }
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    // fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.println("Runtime: " + (System.nanoTime() - start) + "ns");
    // go to sleep
    try {
      Thread.sleep(3000);
    } catch (Exception e) {
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    trs[0] = new ScopeClientWorkerA(0, app, room1);
    trs[1] = new ScopeClientWorkerB(1, app, room2);
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    // fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.println("Runtime: " + (System.nanoTime() - start) + "ns");
    ScopeClientWorkerA soa = (ScopeClientWorkerA) trs[0];
    log.debug("Worker: {} shared object: {}", soa.getId(), soa.getSharedObject().getAttributes());
    ScopeClientWorkerB sob = (ScopeClientWorkerB) trs[1];
    log.debug("Worker: {} shared object: {}", sob.getId(), sob.getSharedObject().getAttributes());
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    Runtime rt = Runtime.getRuntime();
    long startFreeMem = rt.freeMemory();
    System.out.printf("Free mem: %s\n", startFreeMem);
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.printf("Runtime: %s ns\n", (System.nanoTime() - start));
    for (TestRunnable r : trs) {
      Header hdr = ((HeaderWorker) r).getHeader();
      Assert.assertTrue(hdr == null);
    }   
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    }
    // update the timer to extended time
    timer.set(16777215); //16777215, or 4hrs 39 minutes 37.215 seconds
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.printf("Runtime: %s ns\n", (System.nanoTime() - start));
    for (TestRunnable r : trs) {
      Header hdr = ((HeaderWorker) r).getHeader();
      Assert.assertTrue(hdr == null);
    }   
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);

    //kickstarts the MTTR & fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    log.info("Runtime: {} ns", (System.nanoTime() - start));

    for (TestRunnable r : trs) {
      String name = ((HostAddWorker) r).getName();
      Assert.assertTrue(server.lookupGlobal(name + ".localdomain", "nonexistentscope") != null);
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    MultiThreadedTestRunner syncedrunner = new MultiThreadedTestRunner(synced);

    // kickstarts the MTTR & fires off threads
    long start = System.nanoTime();
    try {
      syncedrunner.runTestRunnables();
    } catch (Throwable e) {
      log.warn("Exception {}", e);
      fail();
    }
    System.out.println("Runtime for synced runner: " + (System.nanoTime() - start) + "ns");
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    MultiThreadedTestRunner unsyncedrunner = new MultiThreadedTestRunner(unsynced);

    // kickstarts the MTTR & fires off threads
    start = System.nanoTime();
    try {
      unsyncedrunner.runTestRunnables();
    } catch (Throwable e) {
      log.warn("Exception {}", e);
      fail();
    }
    System.out.println("Runtime for unsynced runner: " + (System.nanoTime() - start) + "ns");
View Full Code Here

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner.runTestRunnables()

    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);

    //kickstarts the MTTR & fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.println("Runtime for int primative with synchronized: "
        + (System.nanoTime() - start) + "ns");

    //dump our ints into a set
    Set<Integer> intList = new HashSet<Integer>(setSize);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.