[ 
https://issues.apache.org/jira/browse/DERBY-5797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290824#comment-13290824
 ] 

Kristian Waagan edited comment on DERBY-5797 at 6/7/12 8:46 AM:
----------------------------------------------------------------

Attaching patch 1a, which makes the test sleep at least one tick on the system 
timer in critical locations. This should ensure that the timestamps of the 
statistics entries should differ.

The patch removes two other sleep-methods. Note that while the method in 
SecurityPolicyReloadingTest takes an argument of number of seconds to sleep, 
the method isn't used. My IDE claims that, and I also removed the method before 
adding the new one in BaseTestCase and the code compiled.

As for the timer resolution issue, I got a 1ms resolution on the Windows 7 
machine I have available, but on a Windows Vista machine I observed a 
resolution of 15/16ms. Starting Windows Media Player brought it down to 1ms :) 
I found a paper at [1], which states that the default timer resolution on 
Windows 7 is 15.6ms (it also discusses timer coalescing).

Patch ready for review.

[1] http://msdn.microsoft.com/en-us/windows/hardware/gg463266.aspx
                
      was (Author: kristwaa):
    Attaching patch 1a, which makes the test sleep at least one tick on the 
system timer in critical locations. This should ensure that the timestamps of 
the statistics entries should differ.

The patch removes two other sleep-methods. Note that while the method in 
SecurityPolicyReloadingTest takes an argument of number of seconds to sleep, 
the method isn't used. My IDE claims that, and I also removed the method before 
adding the new one in BaseTestCase and the code compiled.

As for the timer resolution issue, I got a 1ms resolution on the Windows 7 
machine I have available, but on a Windows Vista machine I observed a 
resolution of 15/16ms. Starting Windows Media Player brought it down to 1ms :) 
I found a paper at [1], which states that the default timer resolution on 
Windows is 15.6ms (it also discusses timer coalescing).

Patch ready for review.

[1] http://msdn.microsoft.com/en-us/windows/hardware/gg463266.aspx
                  
> AssertionFailedError in 
> functionTests.tests.lang.UpdateStatisticsTest.testDisposableStatsEagerness 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5797
>                 URL: https://issues.apache.org/jira/browse/DERBY-5797
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.1.1, 10.10.0.0
>         Environment: windows XP on vmware, ibm 1.6
>            Reporter: Myrna van Lunteren
>         Attachments: derby-5797-1a-sleep_a_tick.diff
>
>
> I noticed a test failure in UpdateStatisticsTest.testDisposableStatsEagerness.
> The link is: 
> http://people.apache.org/~myrnavl/derby_test_results/main/windows/testlog/ibm16/1345812-suites.All_diff.txt
> The stack trace: 
> testDisposableStatsEagerness(org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest)junit.framework.AssertionFailedError
>                at 
> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testDisposableStatsEagerness(UpdateStatisticsTest.java:594)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>                at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>                at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
>                at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
>                at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
>                at 
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>                at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>                at junit.extensions.TestSetup.run(TestSetup.java:25)
>                at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>                at 
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>                at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>                at junit.extensions.TestSetup.run(TestSetup.java:25)
>                at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to