[
https://issues.apache.org/jira/browse/DERBY-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-6544:
---------------------------------
Attachment: error.png
Thanks, Knut, for that advice. That has moved the problem forward. I was able
to reproduce the problem by running a small suite with a couple other tests in
it, which run before the Lucene tests. I can also reproduce the problem on my
Mac by running the small suite with a Swedish locale. The additional tests
are...
GrantRevokeTest
DB2IsolationLevelsTest
...and a Swedish locale can be forced by setting these properties on the
command line...
-Duser.country=SE -Duser.language=sv
I was able to fix the problems in LuceneSupportTest and
LuceneCoarseAuthorizationTest by wrapping those tests in
TestConfiguration.singleUseDatabaseDecorator()s. That trick, however, didn't
work for LuceneSupportPermsTest because its other decorators don't compose
correctly with the singleUse decorator. LuceneSupportPermsTest was using a
sqlAuthorization decorator, which hardcodes the database name, forcing a
collision with the database already created by GrantRevokeTest. I got around
that problem by introducing a new
TestConfiguration.sqlAuthorizationDecoratorSingleUse() decorator, which lets
you override the database name.
With all of those changes, I was able to get the mini suite to run correctly
with a Swedish locale on my Mac. And those changes cleared up the locale
problems on the Windows machine too. However, another problem then surfaced on
the Windows machine: The DropDatabaseSetup.removeDatabase() method now fails to
delete the database created by
TestConfiguration.sqlAuthorizationDecoratorSingleUse(). More specifically,
there are 19 files, mostly in lucenesupportpermsdb/seg0, which it can't delete.
That means that it managed to delete a lot of other files, but for some reason
those 19 files couldn't be deleted. This suggest to me that the problem is not
a Java SecurityManager problem and not even a Windows file permission problem
(the error report says that all of those 19 files are readable and writable).
My first thought was that those 19 files must be open. So I added the following
tearDown() method to LuceneSupportPermsTest:
{noformat}
protected void tearDown()
throws Exception
{
TestConfiguration.getCurrent().shutdownEngine();
super.tearDown();
}
{noformat}
That did not fix the problem. I am attaching a screenshot of the error
(error.png). I would welcome theories about what this new problem is.
Thanks,
-Rick
> Non-english locale flunks LuceneSupportTest
> -------------------------------------------
>
> Key: DERBY-6544
> URL: https://issues.apache.org/jira/browse/DERBY-6544
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.11.0.0
> Reporter: Rick Hillegas
> Attachments: error.png
>
>
> The following error surfaced in the nightly tests on a windows machine with a
> Swedish locale. See
> http://download.java.net/javadesktop/derby/request_5589934/
> {noformat}
> junit.framework.AssertionFailedError: Column value mismatch @ column '1',
> row 1:
> Expected: >en<
> Found: >sv<
> at
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1303)
> at
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1215)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.java:1102)
> at
> org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1025)
> at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:982)
> at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:940)
> at
> org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportTest.testCreateAndQueryIndex(LuceneSupportTest.java:75)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
> 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)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)