Ok I did not notice earlier that the pass fail error count did not
change as Junit could not identify this as an exception. How do we get
the client stacktrace otherwise?
Regards,
Bhakti
Bhakti Mehta wrote:
> Kohsuke,
> We were not getting the client code stacktrace. It used to show the
> stack trace with the ClientExecutor and its line numbers but I could
> not see the actual stack trace of the code . This seems to work fine
> now with this change so please let me know if there is a better way of
> doing it
> Regards,
> Bhakti
>
> Kohsuke Kawaguchi wrote:
>
>> This change is no good. If you don't propagate the exception up to
>> JUnit, JUnit won't learn that there was a failure.
>>
>> At the very least you have to rethrow the exception. I actually
>> believe this whole "e.printStackTrace()" is pointless, because once
>> JUnit catches the exception, it will print that out anyway.
>>
>> What was the motivation for this change?
>>
>> bhaktimehta_at_dev.java.net wrote:
>>
>>> @@ -58,7 +57,10 @@
>>> Reader r = client.script.read();
>>> try {
>>> engine.eval(r, engine.getNameSpace(),
>>> client.script.getName() );
>>> - } finally {
>>> + }catch (Exception e ) {
>>> + e.printStackTrace();
>>> + }
>>> + finally {
>>> r.close();
>>> }
>>> } finally {
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_ws-test-harness.dev.java.net
> For additional commands, e-mail: dev-help_at_ws-test-harness.dev.java.net
>