db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5797) AssertionFailedError in functionTests.tests.lang.UpdateStatisticsTest.testDisposableStatsEagerness
Date Thu, 07 Jun 2012 06:20:23 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan updated DERBY-5797:
-----------------------------------

    Attachment: derby-5797-1a-sleep_a_tick.diff

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
>         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

        

Mime
View raw message