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-4915) test failure in OSReadOnlyTest in assertDirectoryDeleted
Date Fri, 18 Feb 2011 13:01:38 GMT

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

Kristian Waagan updated DERBY-4915:
-----------------------------------

    Attachment: derby-4915-1a-more_persistent_delete.diff

Attaching patch 1a, which makes the delete method more persistent. It will now try to delete
any files three times before giving up.

Using this patch, I was unable to reproduce the delete failure in osReadOnlyTest, but I did
see the debug print telling that the first attempt left one file behind.
It is not clear to me if this is a problem caused by slowness in Derby, the test framwork,
or the file/operating system. On my system the failure or printout could be observed from
zero to two times per 50 runs.

Before committing this patch, I'd like to hear if people think it is acceptable to mask potential
problems in this area by retrying the delete operation.

Note that the patch won't fix all occurrences of this issue, since most tests/decorators use
another delete method.

Patch ready for review.

> test failure in OSReadOnlyTest in assertDirectoryDeleted
> --------------------------------------------------------
>
>                 Key: DERBY-4915
>                 URL: https://issues.apache.org/jira/browse/DERBY-4915
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.7.1.1
>         Environment: windows XP, ibm 1.6 
>            Reporter: Myrna van Lunteren
>         Attachments: derby-4915-1a-more_persistent_delete.diff
>
>
> I've seen the assert flag a failure for deleteing a log file last night, and a seg0 file
the night before.
> This is one stack trace:
> 1) testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.AssertionFailedError:
Failed to delete 2 files (root=F:\test\JarResults.2010-11-23\ibm16_suites.All\system\singleUse\readWrite:
F:\test\JarResults.2010-11-23\ibm16_suites.All\system\singleUse\readWrite\log (isDir=true,
canRead=true, canWrite=true, size=0), F:\jartest\JarResults.2010-11-23\ibm16_suites.All\system\singleUse\readWrite
(isDir=true, canRead=true, canWrite=true, size=0)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertDirectoryDeleted(BaseJDBCTestCase.java:1421)
> 	at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.moveDatabaseOnOS(OSReadOnlyTest.java:295)
> 	at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:160)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> This is another:
> 1) testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.AssertionFailedError:
Failed to delete 2 files (root=F:\test\JarResults.2010-11-22\ibm16_suites.All\system\singleUse\readOnly:
F:\test\JarResults.2010-11-22\ibm16_suites.All\system\singleUse\readOnly\seg0 (isDir=true,
canRead=true, canWrite=true, size=0), F:\jartest\JarResults.2010-11-22\ibm16_suites.All\system\singleUse\readOnly
(isDir=true, canRead=true, canWrite=true, size=0)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertDirectoryDeleted(BaseJDBCTestCase.java:1421)
> 	at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.moveDatabaseOnOS(OSReadOnlyTest.java:295)
> 	at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:152)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:16)
> This is on a machine that I've been able to arrange for a windows machine on which to
run the tests for 10.7 nightly, but this is not a new machine. So perhaps the disk - being
older - is a little slow in deleting? Perhaps the check can be delayed, or redone if failed
first time. 
> I'm still investigating, checking on hardware settings. The disk scan showed up healthy,
and multithreading is not on. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message