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-4804) Make database used in store.OSReadOnlyTest fully read-only
Date Mon, 20 Sep 2010 14:57:33 GMT

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

Kristian Waagan updated DERBY-4804:

    Attachment: derby-4804-2a-common_file_ops.diff

Attached patch 2a, moving some common file operations to PrivilegedFileOpsForTests instead
of keeping them in the test itself.

The following public methods were added:
* BaseJDBCTestCase.
 - assertDirectoryDeleted
   Will delete a directory (also works for a single file) recursively, and all files will
be attempted deleted. Files that cannot be deleted will be reported in the assert message.

* PrivilegedFileOpsForTests
 - persistentRecursiveDelete(File, List)
   Will attempt to delete all files in the directory, and will return a list of files it couldn't
 - getFileInfo(File)
   Obtains some information about a file, returned as a string. Currently returns isDir, canRead,
canWrite, and size.

In addition I made it possible to reuse a copy buffer in the copy routines, and changed a
few throws clauses.

Patch ready for review.

> Make database used in store.OSReadOnlyTest fully read-only
> ----------------------------------------------------------
>                 Key: DERBY-4804
>                 URL: https://issues.apache.org/jira/browse/DERBY-4804
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-4804-1a-test_change.diff, derby-4804-2a-common_file_ops.diff
> store.OSReadOnlyTest is supposed to emulate running Derby on a read-only media, but it
turns out the database directory isn't made read-only - only the files inside the directories
> See http://db.markmail.org/thread/f3qlfx7teg7yk5hr for more details.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message