Is it possible to detach an event in a test running on a remote host?
- I'm using OnNetVarChange event to trigger some event on slave project
- The event handler should be called only by master project
I ve added the command Event.EventName.DetachFromTestComplete() at beginning of slave routine, but apparently it does not prevent the event handler to be executed on the slave.
I'm using TestComplete v11.30 , Python script.
I also have another issue:
I'm running this project on two hosts (+ a master). I'm getting the following error message:
Failed to invoke an object. Reason: timeout expired.
The same error occurred on the two hosts, probably because they are not able to change two (different) NetworkSuite variables.
Could that be caused by the fact that I'm not able to detach the event handler in the hosts, and every time master or hosts modify a NetworkSuite vaiable the calback are called toghether?
I've solved the Runtime Error by including all NetworkSuite variable assignments in critical sections.
I still don't manage to detach the EventHandler ...
not sure to figure it out.
if you call a routine by another one, just use a parameter for the master routine that is set to a default value for all the others routines.
if you call TestExecute, it's the same, but with a command-line parameter.
Yes, finally I did like this.
Anyway the detach function seems not to work. So in the test running on the slaves I have a lot of call to this routine (doing nothing)
Could you please check if you see the same behavior in TestComplete 11.31? This is the latest product version where some issues could be fixed.