Package org.akka.essentials.supervisor.example2

Examples of org.akka.essentials.supervisor.example2.SupervisorTest


  @Test
  public void successTest() throws Exception {
    supervisor.tell(Integer.valueOf(8));

    Integer result = (Integer) Await.result(
        Patterns.ask(supervisor, new Result(), 5000),
        Duration.create(5000, TimeUnit.MILLISECONDS));

    assert result.equals(Integer.valueOf(8));
  }
View Full Code Here


  public void resumeTest() throws Exception {
    supervisor.tell(Integer.valueOf(8));
    supervisor.tell(Integer.valueOf(-8));
   
    Integer result = (Integer) Await.result(
        Patterns.ask(supervisor, new Result(), 5000),
        Duration.create(5000, TimeUnit.MILLISECONDS));

    assert result.equals(Integer.valueOf(8));
  }
View Full Code Here

    _system.scheduler().scheduleOnce(
        Duration.create(0, TimeUnit.MILLISECONDS), supervisor,
        "null", _system.dispatcher());
   
    Integer result = (Integer) Await.result(
        Patterns.ask(supervisor, new Result(), 5000),
        Duration.create(5000, TimeUnit.MILLISECONDS));

    assert result.equals(Integer.valueOf(0));
  }
View Full Code Here

TOP

Related Classes of org.akka.essentials.supervisor.example2.SupervisorTest

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.