[dna-issues] [JBoss JIRA] Resolved: (DNA-135) Time-based stopwatch tests sometimes fail on slow machines
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Mon Jun 16 17:18:34 EDT 2008
[ http://jira.jboss.com/jira/browse/DNA-135?page=all ]
Randall Hauch resolved DNA-135.
-------------------------------
Fix Version/s: 0.2
Resolution: Done
I suspect the most likely cause is the call to "Thread.sleep". These total number of milliseconds was pretty small and probably too close to the precision of the system clock, so I increased the value by an order of magnitude. Hopefully this will improve the likelihood of the tests passing. If not, we'll need to test these using a different technique, or ignore these tests. Greg, please comment with your results (and please reopen if the change is not successful).
> Time-based stopwatch tests sometimes fail on slow machines
> ----------------------------------------------------------
>
> Key: DNA-135
> URL: http://jira.jboss.com/jira/browse/DNA-135
> Project: DNA
> Issue Type: Bug
> Components: Testing
> Affects Versions: 0.2
> Environment: RHEL 5.1 x86 32-bit on Lenovo Thinkpad T60; Sun jdk 1.5.0_11; maven 2.0.8
> Reporter: Greg Haber
> Assigned To: Randall Hauch
> Fix For: 0.2
>
>
> The time-based tests in org.jboss.dna.common.stats.StopwatchTest (shouldReportTotalTime, shouldReportAverageTime, shouldReportMinimumTime, and shouldReportMaximumTime) routinely fail for me on my system. I can't see any pattern for the failures - different tests fail on different runs. Looking at the checkin comments for this class, it looks like these tests are dependent on hardware performance, and that we've previously adjusted them to deal with some slower machines. This makes me think that a) I have the slowest machine of anyone who has yet tried to build DNA; and b) these tests are inherently dangerous because they will result in failures simply because of the performance of a particular machine.
> I don't understand these tests well enough to be able to recommend whether there is a way to modify them to make them work regardless of hardware performance, or whether they need to be scrapped altogether. All I know is that I need to manually modify the closeTo entries to something nearly meaningless (like is(closeTo(100,99))) to get DNA to build on my machine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list