Skip to main content

Test suite interrupt (write exception on server side)

4 replies [Last post]
palineo
Offline
Joined: 2009-02-26
Points: 0

Hi everyone,

I noticed a problem while I run a long suite of interactive test.

At a moment (random), the suite is interrupted (server side) while the server write data to the device (the socket is broken).

This error leads to the same error for remaining tests in the test suite.

Do you know if there is a way to avoid this ?

(I can send callstack if necessary)

Brice.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vsizikov
Offline
Joined: 2004-11-16
Points: 0

Hi Brice,

Most possible reason is the test suite timeout. Typically, it is set to 10 mins, but you could adjust it via "Time Factor" interview question. Setting the time factor to 10 would mean that the timeout is 100 minutes. Setting it to 100 would mean 1000 minutes.

Alternatively, you could try another route: To change "Threads Factor" question, it is located under "custom execution mode" question (once you anlwer yes to that quesion, you'll see it). If you have lots of interactive tests, it would be beneficial to reduce the value from the default 10 to 3 or 1. In that case, changing the time factor would not be needed.

In short: a) either increase "Time Factor" or b) decrease "Threads Factor".

Hope it helps. Please, let me know if changing those values resolved the issue.

Thanks,
--Vladimir

palineo
Offline
Joined: 2009-02-26
Points: 0

Hi Vladimir,

I tried (before my post) to modifiy "Threads Factor" but it did not work.
But it seems that "Time factor" works. I tried twice on a run of 50 tests without prb.

I am going to try more and more to be sure.
Thanks,
Brice.

vsizikov
Offline
Joined: 2004-11-16
Points: 0

Hi Brice,

> I tried (before my post) to modifiy "Threads Factor"
> but it did not work.
> But it seems that "Time factor" works. I tried twice
> on a run of 50 tests without prb.

Yes, the time factor is the easiest way. For the threads factor to work, one needs to consider multiple factors:

* Thread Factor value
* Tests in Bundle value

Essentially, setting the Thread Factor and Tests in Bundle values to 1 would mean that only a single test is being executed at any time, and that should prevent any timeouts.

In case when we have, say, Thread Factor to be 2 and the Tests in Bundle to be 5, that means that inside the JTHarness there will be 2*5=10 threads starting test execution simultaneously right when the test suite starts. And the internal JTHarness timer will start ticking, waiting for 10 minutes (default) before the timeout. So, the first tests would pass, but there are changes that the remaining tests would see the timeout.

Hopefully, my explanation does not complicate things ;)

The easiest way is just to increase Time Factor and be done with it.

But I also find it useful from time to time when I run lots of interactive tests to use the second approach: Thread Factor is 1 and Tests in Bundle is 1. In fact, we introduced the Thread Factor option exactly for these purposes.

Thanks,
--Vladimir

palineo
Offline
Joined: 2009-02-26
Points: 0

Hi Vladimir,

Thanks for your clear explanation.

It works now,
Thanks,
Brice.