FINRAOS / JTAF-XCore

XCore is a framework to define and execute automated tests. It enables automation code development in Java, test script development in XML via domain specific language, and execution & reporting via JUnit.
http://finraos.github.io/JTAF-XCore/
Apache License 2.0
10 stars 17 forks source link

StackOverflowError while executing scripts with no commands before the <tearDown> #4

Open mmlinford opened 9 years ago

mmlinford commented 9 years ago

Scripts that consist entirely of a tearDown block crash because of a StackOverflowError. Scripts with tearDowns are converted to TryRecoverCleanup commands and from a preliminary analysis it looks like the empty try block is executing itself over and over again.

This happens whether or not the tearDown itself contains any commands.

(Partial) Stack trace:

java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.finra.jtaf.core.model.execution.Interpreter.getInvocationTarget(Interpreter.java:273) at org.finra.jtaf.core.model.execution.Interpreter.visitInvocation(Interpreter.java:233) at org.finra.jtaf.core.model.invocationtarget.Command.executeInvocation(Command.java:460) at org.finra.jtaf.core.commands.Block.execute(Block.java:66) at org.finra.jtaf.core.model.invocationtarget.Command.launch(Command.java:97) at org.finra.jtaf.core.model.execution.Interpreter.visitCommand(Interpreter.java:195) at org.finra.jtaf.core.model.invocationtarget.Command.acceptInvocationTargetVisitor(Command.java:438) at org.finra.jtaf.core.model.execution.Interpreter.visitInvocation(Interpreter.java:235) at org.finra.jtaf.core.model.invocationtarget.Command.executeInvocation(Command.java:460) at org.finra.jtaf.core.commands.Block.execute(Block.java:66) at org.finra.jtaf.core.model.invocationtarget.Command.launch(Command.java:97) at org.finra.jtaf.core.model.execution.Interpreter.visitCommand(Interpreter.java:195) at org.finra.jtaf.core.model.invocationtarget.Command.acceptInvocationTargetVisitor(Command.java:438) at org.finra.jtaf.core.model.execution.Interpreter.visitInvocation(Interpreter.java:235) at org.finra.jtaf.core.model.invocationtarget.Command.executeInvocation(Command.java:460) at org.finra.jtaf.core.commands.Block.execute(Block.java:66) at org.finra.jtaf.core.model.invocationtarget.Command.launch(Command.java:97) at org.finra.jtaf.core.model.execution.Interpreter.visitCommand(Interpreter.java:195) at org.finra.jtaf.core.model.invocationtarget.Command.acceptInvocationTargetVisitor(Command.java:438) at org.finra.jtaf.core.model.execution.Interpreter.visitInvocation(Interpreter.java:235) at org.finra.jtaf.core.model.invocationtarget.Command.executeInvocation(Command.java:460) at org.finra.jtaf.core.commands.Block.execute(Block.java:66)

mmlinford commented 9 years ago

Having a script that's entirely a tearDown block doesn't really make sense anyway, so fortunately this bug isn't huge.

snoopysnake commented 8 years ago

No commands in a test's teardown will cause the whole test (containing empty teardown) to repeat infinitely image