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-6623) DatabaseMetaDataTest fails intermittently
Date Wed, 25 Jun 2014 16:26:25 GMT

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

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

Commit 1605478 from [~dagw] in branch 'code/trunk'
[ https://svn.apache.org/r1605478 ]

DERBY-6623 DatabaseMetaDataTest fails intermittently

Patch *derby-6623-2a*, which adds an extra ordering [1] using
IndexDescriptor's *getBaseColumns* method as input to
*Arrays.toString()*. This imposes a total order on the rows returned
from the metadata query, so hopefully we get rid of the
Heisenbug. Note that this caused another unique constraint to be
chosen in the example that failed.

[1] *after* the number of columns in the index: small numbers
    before higher numbers since constraints with a small number of
    columns are considered better

The ordering makes sorting stable iff:

    - the row layout doesn't change
    - no indexes or constraint are added or removed.

Mostly, indexes with early base columns will be sorted first (and
selected as best), although not always: "[11,1]" sorts before "[2,1]",
but the main thing is the same index will be selected for the same
(unchanged) database always.

> DatabaseMetaDataTest fails intermittently
> -----------------------------------------
>
>                 Key: DERBY-6623
>                 URL: https://issues.apache.org/jira/browse/DERBY-6623
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>             Fix For: 10.11.0.0
>
>         Attachments: derby-6623-2.diff, derby-6623-2a.diff, derby-6623-2a.status, derby-6623.diff
>
>
> Saw this on the trunk [[http://download.java.net/javadesktop/derby/request_5592737/javadb-task-3883745.html][regression
tests]]:
> testGetXXportedKeys:
> {code}
> junit.framework.AssertionFailedError: Column value mismatch @ column 'FK_NAME', row 3:
>     Expected: >FKEY3<
>     Found:    >FKEY2<
> 	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.functionTests.tests.jdbcapi.DatabaseMetaDataTest.assertFullResultSet(DatabaseMetaDataTest.java:3930)
> 	at org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest.testGetXXportedKeys(DatabaseMetaDataTest.java:4117)
> 	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)
> {code}



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

Mime
View raw message