[
https://issues.apache.org/jira/browse/DERBY-5824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009698#comment-14009698
]
Rick Hillegas commented on DERBY-5824:
--------------------------------------
Thanks for that analysis, Knut. That sounds like a plausible explanation of
this problem. This defect in this test probably affects all *nix platforms.
Probably Windows platforms too.
The test is trying to simulate running on read-only media. But the simulation
isn't good enough.
At a minimum, the test should be disabled if the user is the operating system's
super-user account. However, I don't know how to detect that condition inside
Java.
I recommend removing this test from the regression suite. We can flag it as a
test case which we run standalone from a non-root account when we vet releases.
Or not.
I am not terribly worried about removing this test. If the database really is
located on read-only media, then I think Derby won't be able to circumvent the
properties of the media. If Derby could, then, yes, there'd be a bug, but not
in Derby. The bug would be at the OS level beneath Derby.
What are your thoughts?
Thanks,
-Rick
> 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
> Labels: derby_triage10_11
>
> 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)