12-12-2007 03:30 PM
12-13-2007 02:52 PM
Hello Rob,
I want to make sure that I understand the problem correctly. You are using the batch process model, and you have a section of code (a few steps) in your clean-up step group that you only want to run once for each batch. You are protecting that section of code with an entrance to a batch synchronization and then an exit from a batch synchronization, both using one-thread-only mode. You also have other sections in your MainSequence that also use a batch synchronization section with different section names.
If an error occurs at a step in MainSequence, TestStand will automatically skip to the clean-up section for that TestSocket. This TestSocket will wait at the enter batch synchronization section in the clean-up section until any (not all TestSockets) of the remaining TestSockets get to any (not the clean-up) synchronization section. When this happens, the TestSocket with the error will then enter into the clean-up synchronization section prematurely before the other TestSockets get a chance to get to the clean-up section. Is this correct?
Does this same behavior happen when you make a smaller sequence file that has a few no-action steps and a few protected synchronization sections? If so, could you post back and upload that sequence file. I look forward to hearing back from you!
12-13-2007 03:24 PM
Thanks for the response, JettR.
You have correctly described the problem I'm having. Let me clarify a couple points. As it turns out, it doesn't seem to matter whether I enter and exit the synchronized section using the batch sync steps or if I set the properties of the individual steps to run in "one-thread-only" mode. It also doesn't seem to matter whether I've assigned names to the synchronized sections or not. One other thing - it doesn't matter if an error occurred - the problem is an execution terminating... I typically terminate an execution (continue to clean-up) if an error occurs, but this can also be reproduced by manually terminating the execution. Also, the problem is more than just the terminated execution running the synchronized section before the other executions are ready - the section is actually executed twice. (Once by the terminated execution, and once by the next execution in line.)
In short, I seems like one potential work-around would be to add some additional code to jump past the cleanup sync section if 1) the execution is terminating and 2) it isn't the only execution running. But it seems like there should be a better way than that.
I've attached a simple sequence that can be used to reproduce the problem. If you run it without terminating any threads, everything will behave as expected. But if you terminate an execution while in the delay in the Main step group, you should see the one-thread-only synchronized step in the cleanup group (a TestStand dialog) get displayed twice.
Let me know if you have any questions. Thanks.
12-14-2007 04:08 PM
Hey Rob,
I tested the sequence file that you uploaded in different versions of TestStand (3.0, 3.1 and 4.0). I only noticed the behavior you are describing in version 3.0. It appears that this behavior has been fixed in version 3.1 and later. Your options at this point are to use the workaround you developed or to upgrade TestStand. Have a good evening!
12-17-2007 07:59 AM
12-18-2007 01:39 PM