Package net.ex337.scriptus.model

Examples of net.ex337.scriptus.model.ScriptProcess.save()


   */
  public void test_wait() throws IOException {

    final ScriptProcess p = datastore.newProcess(TEST_USER, "wait.js", false, "", "owner", TransportType.Dummy);
   
    p.save();
   
    ScriptAction r = p.call();

    assertTrue("Forked correctly", r instanceof Fork);
   
View Full Code Here


           
            ScriptProcess p2 = datastore.getProcess(pid);
           
            ScriptAction r2 = p2.call();
           
            p2.save();

            assertTrue("Waited correctly", r2 instanceof Wait);

            //pause thread until child has termination
           
View Full Code Here

   */
  public void test_wait2() throws IOException {

    final ScriptProcess p = datastore.newProcess(TEST_USER, "wait2.js", false, "", "owner", TransportType.Dummy);
   
    p.save();
   
    ScriptAction r = p.call();

    assertTrue("Forked correctly", r instanceof Fork);
   
View Full Code Here

           
            ScriptAction r2 = p2.call();

            assertTrue("in child termination", r2 instanceof Termination);
           
            p2.save();
           
            r2.visit(this, p2);

          } else {
           
View Full Code Here

           
            ScriptProcess p2 = datastore.getProcess(pid);
           
            ScriptAction r2 = p2.call();

            p2.save();
           
            assertTrue("in child sleep", r2 instanceof Sleep);
           

          }
View Full Code Here

           
            ScriptProcess p2 = datastore.getProcess(pid);
           
            ScriptAction r2 = p2.call();
           
            p2.save();

            assertTrue("Waited correctly", r2 instanceof Wait);

            //pause thread until child has termination
           
View Full Code Here

  public void test_kill() throws IOException {

    final ScriptProcess p = datastore.newProcess(TEST_USER, "kill.js", false, "", "owner", TransportType.Dummy);
   
    p.save();
   
    ScriptAction r = p.call();

    assertTrue("Forked correctly", r instanceof Fork);
   
View Full Code Here

           
            ScriptProcess p2 = datastore.getProcess(pid);
           
            ScriptAction r2 = p2.call();
           
            p2.save();

            assertTrue("Killed correctly", r2 instanceof Kill);
           
            r2.visit(this, p2);
View Full Code Here

    ScriptAction r = p.call();
   
    assertTrue("Asked correctly", r instanceof Ask);
    assertTrue("Asked correctly foo", ((Ask)r).getWho().equals("foo"));
   
    p.save();

    r.visit(new ScriptusFacade(datastore, c, m, conf), p);
   
  }
View Full Code Here

    ScriptAction r = p.call();
   
    assertTrue("Asked correctly", r instanceof Ask);
    assertNull("Asked correctly owner", ((Ask)r).getWho());
   
    p.save();

    r.visit(new ScriptusFacade(datastore, c, m, conf), p);
   
  }
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.