|
Re: HyadesRunner times out on isOKToStart [message #85211 is a reply to message #84606] |
Thu, 12 October 2006 21:29 |
Joe Toomey Messages: 79 Registered: July 2009 |
Member |
|
|
Per Johansson wrote:
> Hi,
>
> I have a custom test type built based on the tutorial Building a Custom Test
> Execution Environment, which I am trying to port from TPTP 3.3 to TPTP 4.2.
> I have followed the migration guide to 4.0 and the client side seems ok. The
> session JVM is launched and the test runner JVM is launched. But my test
> runner stops working already in the constructor, when the HyadesRunner is
> initiated. The HyadesRunner waits for the flag isOKToStart for 3 minutes and
> then exits. The isOKToStart flag should be set when a command START is
> received, but this never happens. No command is received.
>
> Any suggestions?
>
> /BR, Per Johansson
>
>
>
>
Hi Per,
This is caused by a regression from the fix for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=84790 . After your
executable object adapter sets the jvm arguments, they are further
modified to include the name of the test agent that the workbench should
look for. In the fix for 84790, the way in which the agent name is
added to the jvm arguments changed, and although the fix appears to have
been written to work properly with test types that pass their runner
arguments positionally, it in fact does not work.
The easiest way to fix this is to pass your script name in a
specifically named jvm property like this:
protected final String TEST_CLASS = "hyades.runner.testClass";
....
jvmArgs += "-D" + TEST_CLASS +"=\"" + theImplementor.getResource() + "\"";
jvmArgs += "org.eclipse.hyades.test.perl.runner.HyadesPerlRunner";
and then read the script name from that jvm property name in the runner
like this:
....
private void runTest(String[] args) {
try {
runnerStarted();
String perlScript = System.getProperty("hyades.runner.testClass");
if ( perlScript == null )
{
logVerdict("No script specified", VerdictEvent.VERDICT_ERROR);
throw new Exception();
}
String cmdArray[] = {"perl", perlScript};
....
I have filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=160757 to
track fixing the overall problem, and I have ammended the ported 4.2
code on the TPTP website with the suggestions I made above.
http://www.eclipse.org/tptp/test/documents/tutorials/eclipse Con2005/ImprovedEclipseConDemo_ported_TPTP42.zip
Thanks for identifying the issue.
--Joe
|
|
|
Powered by
FUDForum. Page generated in 0.08034 seconds