jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60444] New: Intermittend failure of TestHTTPMirrorThread#testSleep()
Date Mon, 05 Dec 2016 21:34:54 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60444

            Bug ID: 60444
           Summary: Intermittend failure of
                    TestHTTPMirrorThread#testSleep()
           Product: JMeter
           Version: 3.0
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: ts-nospam12@online.de
  Target Milestone: ---

Created attachment 34500
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34500&action=edit
complete log of ant build

This might be OS specific: Running the tests, I'm occasionally stalled by the
following test failure:

     [java] There was 1 failure:
     [java] 1)
testSleep(org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread)
     [java] junit.framework.AssertionFailedError: Expected > 1000 992
     [java]     at junit.framework.Assert.fail(Assert.java:57)
     [java]     at junit.framework.Assert.assertTrue(Assert.java:22)
     [java]     at junit.framework.TestCase.assertTrue(TestCase.java:192)
     [java]     at
org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread.testSleep(TestHTTPMirrorThread.java:413)

I'm not too certain about the primary cause, which I think, is one of the
following:
a.) Thread.sleep() relies on the granularity of the internal clock, which might
shave off some millis from the 1000 ms, that have been asked for.
b.) The JVM generally isn't guaranteed to wait the full time given anyway, as
the sleep might get interrupted.

Now I'm a bit at a loss, what is the intention here: 
If accuracy in maintaining the contract is required, I may fix this, by
tracking the actual time spent waiting arround the invocation of
    TimeUnit.MILLISECONDS.sleep(Integer.parseInt(sleepHeaderValue))
@ HttpMirrorThread:223.

else we might just relax the assertion wihin the test.

Do we ever need this functionality?


Wadayathink?

P.S.:
The issue is annoying, since it breaks the test execution in one out of three
executions on my machine, and it did so since I startet to dig through the code
with Rel 3.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message