Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 60E979DD0 for ; Thu, 7 Jun 2012 08:48:26 +0000 (UTC) Received: (qmail 34868 invoked by uid 500); 7 Jun 2012 08:48:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34565 invoked by uid 500); 7 Jun 2012 08:48:25 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 34493 invoked by uid 99); 7 Jun 2012 08:48:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2012 08:48:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 5EB8B1402B8 for ; Thu, 7 Jun 2012 08:48:23 +0000 (UTC) Date: Thu, 7 Jun 2012 08:48:22 +0000 (UTC) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Message-ID: <1640774865.46967.1339058903390.JavaMail.jiratomcat@issues-vm> In-Reply-To: <414588493.35410.1338833063533.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Comment Edited] (DERBY-5797) AssertionFailedError in functionTests.tests.lang.UpdateStatisticsTest.testDisposableStatsEagerness MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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