diff --git a/tests/general/LoadTest.cfc b/tests/general/LoadTest.cfc index ff61a0f..292d878 100644 --- a/tests/general/LoadTest.cfc +++ b/tests/general/LoadTest.cfc @@ -21,21 +21,32 @@ component extends="org.lucee.cfml.test.LuceeTestCase" { throw "repetitition or thread count need to be bigger than 1"; var names = []; + var exceptions = []; for (var i = 1; i <= arguments.repetitition; i++) { for (var y = 1; y <= arguments.threadcount; y++) { var name="testThread:#i#:#y#"; arrayAppend(names, name); - thread action="run" name=name udf=code args=arguments { - udf(argumentCollection:args); + thread action="run" name=name udf=code args=arguments exceptions=exceptions { + try { + udf(argumentCollection:args); + } + catch(e) { + arrayAppend(exceptions, e); + } + } } } thread action="join" name=arrayToList(names); + if(len(exceptions)) { + throw exceptions[1]; + } } private function code() { systemOutput("execute the code",1,1); + throw "upsi dupsi!"; } } \ No newline at end of file