Forum Discussion

jpaudel's avatar
jpaudel
Occasional Contributor
10 years ago

How to synchronize points in script when two different application are running in different machine?

I have two different applications to launch in two different machine,

Situation is first run an application and execute it to some steps then once it reaches at that point, launch another application in another machine and let notify the 1st machine that the application on 2nd machine has begun. then follow rest of the execution in 1st machine. 

I used Networksuite.synchronize("...") in two different machine , in first machine at the point where i want to get another application launch in another machine. Also in the 2nd machine , at the beginning on it.

 

My problem is when the test complete reaches at that particular synch points, it just awaits and nothing actually happens. the application on 2nd machine does not run at all.

 

Please Help me to figure this out.

1 Reply

  • Hey jpaudel, how's going?!

     

    How are your projects organized?

    If I'm not mistaken you should have Synchpoints only in your Slave Projects and then when both machines get to the same point, it'll get back to execution.

     

    For example, in your Slave Project you have the following unit:

     

    function ExecutionHost1()
    {
      //Do something...
      NetworkSuite.SynchPoints.EndExec.WaitFor();
    }
    
    function ExecutionHost2()
    {
      NetworkSuite.SynchPoints.EndExec.WaitFor();
      //Do something...
    }

    In this case, the function Execution Host 2 will only do something when the Execution Host 1 get's to the Synchpoint.

     

    If that doesn't help, would it be possible for you to send some of your code or maybe some images of your projects structure?