db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6642) Make the JUnit result set assertion methods dump the actual rs when assertion fails
Date Mon, 30 Jun 2014 19:54:24 GMT

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

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

Example of an error (faked one in InListMultiProbetest):
{code}
1) testInListProbingWithOrderBy(org.apache.derbyTesting.functionTests.tests.lang.InListMultiProbeTest)junit.framework.AssertionFailedError:
Column value mismatch @ column 'CHEESE_NAME', row 3:
    Expected: >EDAMM<
    Found:    >EDAM<

    CHEESE_CODE,CHEESE_NAME,CHEESE_COST,CHEESE_CODE,CHEESE_NAME,CHEESE_COST
    ----------- ----------- ----------- ----------- ----------- -----------
   {00000,EDAM,2.1111}
   {00000,EDAM,2.1111}
   {00000,EDAM,999.8888,00000,EDAM,2.1111}
   {00000,EDAM,2.1111,54321,EDAM,8.5646}
   {54321,EDAM,8.5646,54321,EDAM,8.5646}
   {AAAAA,EDAM,999.8888,54321,EDAM,8.5646}

	at org.apache.derbyTesting.junit.JDBC.addRsToReport(JDBC.java:1887)
	at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1377)
	at org.apache.derbyTesting.junit.JDBC.assertPartialResultSet(JDBC.java:1211)
	at org.apache.derbyTesting.functionTests.tests.lang.InListMultiProbeTest.testInListProbingWithOrderBy(InListMultiProbeTest.java:781)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	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 org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at singlederbyjunittest.SingleDerbyJunitTest.main(SingleDerbyJunitTest.java:22)

FAILURES!!!
Tests run: 15,  Failures: 1,  Errors: 0
{code}

> Make the JUnit result set assertion methods dump the actual rs when assertion fails
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-6642
>                 URL: https://issues.apache.org/jira/browse/DERBY-6642
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>         Attachments: derby-6642.diff
>
>
> Often, when researching intermittent regression test errors, an assertion on a result
set fails, but the error report only shows which column in which row first fails to meet expectations.
It would be good if the assertion methods could dump the actual result set in such cases so
we'd have more information to go on when trying to understand the cause of the problem.



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

Mime
View raw message