You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2014/06/18 22:58:24 UTC

[jira] [Commented] (DERBY-6623) DatabaseMetaDataTest fails intermittently

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

Dag H. Wanvik commented on DERBY-6623:
--------------------------------------

I notice that the value FKEY3 (and FKEY2) in the test are foreign keys. Looking at the test, we are asking for imported keys (line 4116).The query we use (internally) for embedded metadata queries (cd java/engine/org/apache/derby/impl/jdbc/metadata.properties query "getImportedKeys") has the following 
ORDER BY clause at the end:
{code}
"ORDER BY PKTABLE_CAT,  \
				PKTABLE_SCHEM, \
				PKTABLE_NAME, \
				PK_NAME, \
				KEY_SEQ
{code}
As far as I can, it does not order the rows on FK_NAME, which is the foreign key name. This could possibly be the reason the rows come back in an unexpected order in the test.




> 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
>
> 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)