You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2014/06/03 15:16:02 UTC

[jira] [Updated] (DERBY-5824) testOSReadOnly fails with k.AssertionFailedError: expected an error indicating the db is readonly on HP java 1.6

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

Knut Anders Hatlen updated DERBY-5824:
--------------------------------------

    Attachment: disable-for-root.diff

The attached patch, [^disable-for-root.diff], adds the following check to the test:

1) Create a temporary file in the directory in which the test runs

2) Make the temporary file read-only

3) Attempt to open the file in read-write mode

If 3 fails, all is good, and the test runs. If 3 is successful, it means the database is not going to be read-only, so a message is printed and the test is skipped.

I'm now able to run the test as root without failures.

I've run the entire test suite with the patch. I saw one failure (logged as DERBY-6595), but I think it's not related to the patch. The failing test passed when I reran it.

> testOSReadOnly fails with k.AssertionFailedError: expected an error indicating the db is readonly on HP java 1.6
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5824
>                 URL: https://issues.apache.org/jira/browse/DERBY-5824
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.5.3.1
>         Environment: HP Itanium Java version 1.6.0.14
> OS name:         HP-UX
> OS architecture: IA64N
> OS version:      B.11.23
>            Reporter: Kathey Marsden
>            Assignee: Knut Anders Hatlen
>              Labels: derby_triage10_11
>         Attachments: disable-for-root.diff
>
>
> This failure was reported running suites.All on HP. Read only database is apparently not read only.
> 1) testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.AssertionFailedError: expected an error indicating the db is readonly
>         at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:261)
>         at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:139)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         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: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)
>         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)
> 2) testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.AssertionFailedError: Failed to copy directory from /local1/derbytest/test/system/singleUse/oneuse4b to /local1/derbytest/test/system/singleUse/readOnly
>         at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.copyDatabaseOnOS(OSReadOnlyTest.java:282)
>         at org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:131)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         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: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)
>         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 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)
> FAILURES!!!
> Tests run: 11145,  Failures: 2,  Errors: 0
> bash-4.0#



--
This message was sent by Atlassian JIRA
(v6.2#6252)