You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Patricia Shanahan <pa...@acm.org> on 2010/10/22 11:06:58 UTC
How to question.
Does anyone know how to pass JVM parameters to the client JVM that runs
the actual test code?
Thanks,
Patricia
Re: How to question.
Posted by Peter Firmstone <ji...@zeus.net.au>.
Patricia Shanahan wrote:
> Does anyone know how to pass JVM parameters to the client JVM that
> runs the actual test code?
>
> Thanks,
>
> Patricia
>
For all tests client or just one?
For one test client, specify the jvm arguments in the *.td file:
testjvmargs=${testjvmargs},-Djava.security.debug=access:failure,-Dsome.other.arg=something
To set global test arguments for all clients see the file:
qa/src/com/sun/jini/qa/resources/qaDefaults.properties
Cheers,
Peter.
Re: How to question.
Posted by Patricia Shanahan <pa...@acm.org>.
Peter Firmstone wrote:
> Patricia Shanahan wrote:
>> On 10/22/2010 5:12 PM, Peter Firmstone wrote:
>>> Patricia Shanahan wrote:
>>>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>>>> Does anyone know how to pass JVM parameters to the client JVM that
>>>>> runs
>>>>> the actual test code?
>>>>
>>>> My problem has become more specific. I can get arguments in by editing
>>>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>>>> embed commas in an argument. The processing between the file and the
>>>> java command line uses commas as a separator, and I have not yet found
>>>> a way to escape a comma.
>>>
>>> $,
>>
>> It turns out the correct escape is +,
>>
>> This is documented in the comment on QAConfig.java's parseArgList
>> method. Maybe it should be documented somewhere a bit more prominent,
>> such as in qaDefault.properties?
>>
>> Patricia
>>
>
> Yes good idea, we should copy to qaDefault.properties also, I think we
> need a qa test how-to also.
I've checked in the change to qaDefault.properties. Now I'm back to bug
hunting, but with the aid of Eclipse's debugger.
>
> Thanks for working it out, did you have a good vacation?
Great vacation, thanks. Saw family, including a nephew's wedding, went
to plays, operas, museums, day trip from London to Paris...
Patricia
Re: How to question.
Posted by Peter Firmstone <ji...@zeus.net.au>.
Patricia Shanahan wrote:
> On 10/22/2010 5:12 PM, Peter Firmstone wrote:
>> Patricia Shanahan wrote:
>>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>>> Does anyone know how to pass JVM parameters to the client JVM that
>>>> runs
>>>> the actual test code?
>>>
>>> My problem has become more specific. I can get arguments in by editing
>>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>>> embed commas in an argument. The processing between the file and the
>>> java command line uses commas as a separator, and I have not yet found
>>> a way to escape a comma.
>>
>> $,
>
> It turns out the correct escape is +,
>
> This is documented in the comment on QAConfig.java's parseArgList
> method. Maybe it should be documented somewhere a bit more prominent,
> such as in qaDefault.properties?
>
> Patricia
>
Yes good idea, we should copy to qaDefault.properties also, I think we
need a qa test how-to also.
Thanks for working it out, did you have a good vacation?
Cheers,
Peter.
Re: How to question.
Posted by Patricia Shanahan <pa...@acm.org>.
On 10/22/2010 5:12 PM, Peter Firmstone wrote:
> Patricia Shanahan wrote:
>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>> Does anyone know how to pass JVM parameters to the client JVM that runs
>>> the actual test code?
>>
>> My problem has become more specific. I can get arguments in by editing
>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>> embed commas in an argument. The processing between the file and the
>> java command line uses commas as a separator, and I have not yet found
>> a way to escape a comma.
>
> $,
It turns out the correct escape is +,
This is documented in the comment on QAConfig.java's parseArgList
method. Maybe it should be documented somewhere a bit more prominent,
such as in qaDefault.properties?
Patricia
Re: How to question.
Posted by Patricia Shanahan <pa...@acm.org>.
On 10/22/2010 6:53 PM, Peter Firmstone wrote:
> Patricia Shanahan wrote:
>> On 10/22/2010 5:12 PM, Peter Firmstone wrote:
>>> Patricia Shanahan wrote:
>>>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>>>> Does anyone know how to pass JVM parameters to the client JVM that
>>>>> runs
>>>>> the actual test code?
>>>>
>>>> My problem has become more specific. I can get arguments in by editing
>>>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>>>> embed commas in an argument. The processing between the file and the
>>>> java command line uses commas as a separator, and I have not yet found
>>>> a way to escape a comma.
>>>
>>> $,
>>
>> It translates:
>>
>> -Xrunjdwp:transport=dt_socket$,server=y$,address=3408$,suspend=y
>>
>> to:
>>
>> -Xrunjdwp:transport=dt_socket=y=3408=y
>>
>> Which looks as though it is dropping everything from the "$," through
>> the character before the next "=".
>>
>> I've also tried "\,", and enclosing the whole argument in various
>> forms of quotes.
>>
>> Patricia
>>
> It's a long shot, but could you try:
>
> -Xrunjdwp:transport=dt_socket,-Xrunjdwp:server=y,-Xrunjdwp:address=3408,-Xrunjdwp:suspend=y
Worth trying, but fails the way you would expect:
[java] ERROR: JDWP Non-server transport dt_socket must have a
connection address specified through the 'address=' option
It rejects whichever I specify first of dt_socket and address, due to
the lack of the other.
Looks like it's back to sticking in System.err.printf calls and
rebuilding. Slow and inconvenient, but at least it works.
Patricia
Re: How to question.
Posted by Peter Firmstone <ji...@zeus.net.au>.
Patricia Shanahan wrote:
> On 10/22/2010 5:12 PM, Peter Firmstone wrote:
>> Patricia Shanahan wrote:
>>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>>> Does anyone know how to pass JVM parameters to the client JVM that
>>>> runs
>>>> the actual test code?
>>>
>>> My problem has become more specific. I can get arguments in by editing
>>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>>> embed commas in an argument. The processing between the file and the
>>> java command line uses commas as a separator, and I have not yet found
>>> a way to escape a comma.
>>
>> $,
>
> It translates:
>
> -Xrunjdwp:transport=dt_socket$,server=y$,address=3408$,suspend=y
>
> to:
>
> -Xrunjdwp:transport=dt_socket=y=3408=y
>
> Which looks as though it is dropping everything from the "$," through
> the character before the next "=".
>
> I've also tried "\,", and enclosing the whole argument in various
> forms of quotes.
>
> Patricia
>
It's a long shot, but could you try:
-Xrunjdwp:transport=dt_socket,-Xrunjdwp:server=y,-Xrunjdwp:address=3408,-Xrunjdwp:suspend=y
Re: How to question.
Posted by Patricia Shanahan <pa...@acm.org>.
On 10/22/2010 5:12 PM, Peter Firmstone wrote:
> Patricia Shanahan wrote:
>> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>>> Does anyone know how to pass JVM parameters to the client JVM that runs
>>> the actual test code?
>>
>> My problem has become more specific. I can get arguments in by editing
>> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
>> embed commas in an argument. The processing between the file and the
>> java command line uses commas as a separator, and I have not yet found
>> a way to escape a comma.
>
> $,
It translates:
-Xrunjdwp:transport=dt_socket$,server=y$,address=3408$,suspend=y
to:
-Xrunjdwp:transport=dt_socket=y=3408=y
Which looks as though it is dropping everything from the "$," through
the character before the next "=".
I've also tried "\,", and enclosing the whole argument in various forms
of quotes.
Patricia
Re: How to question.
Posted by Peter Firmstone <ji...@zeus.net.au>.
Patricia Shanahan wrote:
> On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
>> Does anyone know how to pass JVM parameters to the client JVM that runs
>> the actual test code?
>
> My problem has become more specific. I can get arguments in by editing
> qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
> embed commas in an argument. The processing between the file and the
> java command line uses commas as a separator, and I have not yet found
> a way to escape a comma.
$,
>
> The objective is to use -Xrunjdwp to connect between a test and an
> Eclipse debug session. That way, I won't have to keep rebuilding to
> put in print statements to get information out from a failing test.
>
> Patricia
>
Re: How to question.
Posted by Patricia Shanahan <pa...@acm.org>.
On 10/22/2010 2:06 AM, Patricia Shanahan wrote:
> Does anyone know how to pass JVM parameters to the client JVM that runs
> the actual test code?
My problem has become more specific. I can get arguments in by editing
qa/src/com/sun/jini/qa/resources/qaDefaults.properties, but I need to
embed commas in an argument. The processing between the file and the
java command line uses commas as a separator, and I have not yet found a
way to escape a comma.
The objective is to use -Xrunjdwp to connect between a test and an
Eclipse debug session. That way, I won't have to keep rebuilding to put
in print statements to get information out from a failing test.
Patricia