Ejemplo n.º 1
0
 /** Test of run method, of class ISPController. */
 @Test
 public void testRun() {
   System.out.println("testRun");
   instance.start();
   assert (instance.isAlive());
   instance.exit();
   sleepMillis(1_500);
   assert (!instance.isAlive());
 }
Ejemplo n.º 2
0
 @After
 public void tearDown() {
   System.out.println("tearDown");
   instance.exit();
   sleepMillis(1_500);
   if (instance.isAlive()) {
     LOGGER.warn("The controller thread is still running!");
   } else {
     LOGGER.info("The controller thread has exited.");
   }
 }
Ejemplo n.º 3
0
  /** Test of exit method, of class ISPController. */
  @Test
  public void testExit() {
    System.out.println("testExit");

    List<String> hosts = new ArrayList();
    hosts.add("uva.nl");

    instance.doInBackground(hosts);
    sleepMillis(120);
    instance.exit();
    sleepMillis(1_500);
    assertFalse(instance.isRunning());
    assertFalse(instance.isAlive());
  }