db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6864) RawDBReaderTest fails on Windows
Date Wed, 03 Feb 2016 20:36:39 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131082#comment-15131082
] 

ASF subversion and git services commented on DERBY-6864:
--------------------------------------------------------

Commit 1728370 from [~knutanders] in branch 'code/trunk'
[ https://svn.apache.org/r1728370 ]

DERBY-6864: RawDBReaderTest fails on Windows

RawDBReaderTest.runRecoveryScript() opens a FileReader, but doesn't
close it. When the test harness tries to delete the test directory
upon completion of the test, it fails because one of the files in the
directory is still open.

This patch makes runRecoveryScript() open the FileReader in a
try-with-resources statement, so that it is automatically closed when
it goes out of scope.

> RawDBReaderTest fails on Windows
> --------------------------------
>
>                 Key: DERBY-6864
>                 URL: https://issues.apache.org/jira/browse/DERBY-6864
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.13.0.0
>         Environment: Windows 10
> JDK 8u71
> Derby trunk revision 1728254
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d6864.diff
>
>
> RawDBReaderTest fails on Windows with the following output:
> {noformat}
> .<assertDirectoryDeleted> attempt 1 left 2 files/dirs behind: 0=extinout\recovery.sql
1=extinout
> <assertDirectoryDeleted> attempt 2 left 2 files/dirs behind: 0=extinout\recovery.sql
1=extinout
> <assertDirectoryDeleted> attempt 3 left 2 files/dirs behind: 0=extinout\recovery.sql
1=extinout
> <assertDirectoryDeleted> attempt 4 left 2 files/dirs behind: 0=extinout\recovery.sql
1=extinout
> F
> Time: 39,498
> There was 1 failure:
> 1) RawDBReaderTest:embeddedjunit.framework.AssertionFailedError: Failed to delete 2 files
(root=C:\cygwin64\tmp\derbytst\extinout): C:\cygwin64\tmp\derbytst\extinout\recovery.sql (isDir=false,
canRead=true, canWrite=true, size=801), C:\cygwin64\tmp\derbytst\extinout (isDir=true, canRead=true,
canWrite=true, size=0)
>         at org.apache.derbyTesting.junit.BaseTestCase.assertDirectoryDeleted(BaseTestCase.java:1125)
>         at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:128)
>         at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:118)
>         at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:130)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:24)
>         at junit.extensions.TestSetup.run(TestSetup.java:27)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message