db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4318) convert inbetween.sql to JUNIT
Date Thu, 30 Jul 2009 19:06:15 GMT

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

Kathey Marsden commented on DERBY-4318:
---------------------------------------

Hi Eranda, when I tried to run the test I saw a different failure:

test_inbetween used 1968 ms F.
test_inbetween used 5156 ms F
Time: 11.828
There were 2 failures:
1) test_inbetween(org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest)junit.framework.AssertionFailedError:
C
olumn value mismatch @ column '1', row 1:
    Expected: >Statement Name:
null
Statement Text:
call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)
Parse Time: 0
Bind Time: 0
Optimize Time: 0
Generate Time: 0
Compile Time: 0
Execute Time: 0
Begin Compilation Timestamp : null
End Compilation Timestamp : null
Begin Execution Timestamp : null
End Execution Timestamp : null
Statement Execution Plan Text:
null<
    Found:    >Statement Name:
        null
Statement Text:
         call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)
Parse Time: 0
Bind Time: 0
Optimize Time: 0
Generate Time: 0
Compile Time: 0
Execute Time: 0
Begin Compilation Timestamp : null
End Compilation Timestamp : null
Begin Execution Timestamp : null
End Execution Timestamp : null
Statement Execution Plan Text:
null<
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1092)
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1004)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:892)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:830)
        at org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest.test_inbetween(InbetweenTest.java:1608)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
2) test_inbetween(org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest)junit.framework.AssertionFailedError:
C
olumn value mismatch @ column '1', row 1:
    Expected: >Statement Name:<
    Found:    >Statement Name:
        SQL_CURLH000C15
Statement Text:
        select c1 from t2 where c1 in (select c1 from t1 where c1 in (5, t2.c2))
Parse Time: 0
Bind Time: 0
Optimize Time: 0
Generate Time: 0
Compile Time: 0
Execute Time: 0
Begin Compilation Timestamp : null
End Compilation Timestamp : null
Begin Execution Timestamp : null
End Execution Timestamp : null
Statement Execution Plan Text:
Project-Restrict ResultSet (5):
Number of opens = 1
Rows seen = 2
Rows filtered = 0
restriction = false
projection = true
        constructor time (milliseconds) = 0
        open time (milliseconds) = 0
        next time (milliseconds) = 0
        close time (milliseconds) = 0
        restriction time (milliseconds) = 0
        projection time (milliseconds) = 0
        optimizer estimated row count:            1.00
        optimizer estimated cost:           60.02

Source result set:
        Hash Exists Join ResultSet:
        Number of opens = 1
        Rows seen from the left = 4
        Rows seen from the right = 2
        Rows filtered = 0
        Rows returned = 2
                constructor time (milliseconds) = 0
                open time (milliseconds) = 0
                next time (milliseconds) = 0
                close time (milliseconds) = 0
                optimizer estimated row count:            1.00
                optimizer estimated cost:           60.02

        Left result set:
                Table Scan ResultSet for T2 at serializable isolation level using share table
locking chosen by the opti
mizer
                Number of opens = 1
                Rows seen = 4
                Rows filtered = 0
                Fetch Size = 16
                        constructor time (milliseconds) = 0
                        open time (milliseconds) = 0
                        next time (milliseconds) = 0
                        close time (milliseconds) = 0
                        next time in milliseconds/row = 0

                scan information:
                        Bit set of columns fetched=All
                        Number of columns fetched=2
                        Number of pages visited=1
                        Number of rows qualified=4
                        Number of rows visited=4
                        Scan type=heap
                        start position:
null                    stop position:
null                    qualifiers:
None
                        optimizer estimated row count:            9.00
                        optimizer estimated cost:           39.32

        Right result set:
                Project-Restrict ResultSet (4):
                Number of opens = 4
                Rows seen = 2
                Rows filtered = 0
                restriction = true
                projection = false
                        constructor time (milliseconds) = 0
                        open time (milliseconds) = 0
                        next time (milliseconds) = 0
                        close time (milliseconds) = 0
                        restriction time (milliseconds) = 0
                        projection time (milliseconds) = 0
                        optimizer estimated row count:            1.00
                        optimizer estimated cost:           20.69

                Source result set:
                        Hash Scan ResultSet for T1 using index I11 at serializable isolation
level using share table loc
king:
                        Number of opens = 4
                        Hash table size = 5
                        Hash key is column number 0
                        Rows seen = 2
                        Rows filtered = 0
                                constructor time (milliseconds) = 0
                                open time (milliseconds) = 0
                                next time (milliseconds) = 0
                                close time (milliseconds) = 0
                                next time in milliseconds/row = 0

                        scan information:
                                Bit set of columns fetched={0}
                                Number of columns fetched=1
                                Number of deleted rows visited=0
                                Number of pages visited=1
                                Number of rows qualified=5
                                Number of rows visited=5
                                Scan type=btree
                                Tree height=1
                                start position:
        None
                                stop position:
        None
                                scan qualifiers:
None
                                next qualifiers:
Column[0][0] Id: 0
Operator: =
Ordered nulls: false
Unknown return value: false
Negate comparison result: false

                                optimizer estimated row count:            1.00
                                optimizer estimated cost:           20.69<
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1092)
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1004)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:892)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:830)
        at org.apache.derbyTesting.functionTests.tests.lang.InbetweenTest.test_inbetween(InbetweenTest.java:3828)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

FAILURES!!!
Tests run: 2,  Failures: 2,  Errors: 0


I think typically instead of checking the full RuntimeStatistics output, tests use RuntimeStatisticsParser
to verify relevant output.

I also noticed the test name was wrong in the license header and think it might be good to
split this test up into multiple fixtures if that is practical.

But back to the question you asked, to see the dependency issue should I uncomment the code
around line 1860?  Was the patch Rick provided helpful in isolating the issue?



> convert inbetween.sql to JUNIT
> ------------------------------
>
>                 Key: DERBY-4318
>                 URL: https://issues.apache.org/jira/browse/DERBY-4318
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Eranda Sooriyabandara
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>         Attachments: inbetween.junit, InbetweenTest.diff, InbetweenTest.diff
>
>
> conversion of inbetween.sql to JUNIT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message