On 21.02.17 14:09, Thomas Mueller wrote:
Hi, I assume with (b) you mean: change tests to use loops, combined with very high timeouts. Example:
No I actually meant getting individual time-out values (or a scaling factor for time-outs) from CIHelper. That class already provides the means to skip tests based on where they are running. So it should be relatively straight forward to have it supply scaling factors for time-outs in a similar manner.
Michael
Before: save(); Thread.sleep(1000); assertTrue(abc()); After: save(); for(int i=0; !abc() && i<600; i++) { Thread.sleep(100); } assertTrue(abc()); The additional benefit of this logic is that on a fast machine, the test is faster (only 100 ms sleep instead of 1 second). Disadvantage: additional complexity, as you wrote (could be avoided with Java 8 lambda expressions). Regards, Thomas On 21/02/17 13:49, "Michael Dürig" <[email protected]> wrote:Hi, I assume that at least some of the tests that sporadically fail on the Apache Jenkins fail because of timing issues. To address this we could either a) skip these tests on Jenkins, b) increase the time-out, c) apply platform dependent time-outs. I would prefer b). I presume that there is no impact on the build time unless the build fails anyway because it is running into one of these time-outs. If this is not acceptable we could go for b) and provision platform dependent time-outs through the CIHelpers class. I somewhat dislike the additional complexity though. As last resort we can still do a). WDYT? Michal
