Forum Discussion
Hoobajoob
11 years agoOccasional Contributor
One other thing to note - for the "One Shot Guard" groovy task, that conditional logic in the example I gave is subject to a race condition when the test case is driven by the LoadUI generators. 2 or more different threads can make it past the conditional logic before they block on the "Run TestCase" step, which will result in 2 or more threads running the setup task, which should be run no more than once.
I think there are at least 3 possible solutions to that problem:
1) Move the one-shot guard logic out of the "wrapper" test case and into the "wrapped" test case (the one that is executed by the Run TestCase step) - this would ensure that no 2 threads hit that conditional logic simultaneously
2) Change the SoapUI Runner advanced settings in LoadUI so that it admits no more than 1 outstanding concurrent request on the setup test case
3) Add yet another wrapper around the "One Shot" test case using a "Run TestCase" step with the same Run Mode settings
...I just changed the LoadUI advanced setting for max concurrent requests to "1".
I think there are at least 3 possible solutions to that problem:
1) Move the one-shot guard logic out of the "wrapper" test case and into the "wrapped" test case (the one that is executed by the Run TestCase step) - this would ensure that no 2 threads hit that conditional logic simultaneously
2) Change the SoapUI Runner advanced settings in LoadUI so that it admits no more than 1 outstanding concurrent request on the setup test case
3) Add yet another wrapper around the "One Shot" test case using a "Run TestCase" step with the same Run Mode settings
...I just changed the LoadUI advanced setting for max concurrent requests to "1".