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 "Houx Zhang (JIRA)" <ji...@apache.org> on 2011/06/28 16:23:17 UTC

[jira] [Created] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Convert store/TableLockBasic.sql  to junit
------------------------------------------

                 Key: DERBY-5301
                 URL: https://issues.apache.org/jira/browse/DERBY-5301
             Project: Derby
          Issue Type: Sub-task
          Components: Test
            Reporter: Houx Zhang
            Assignee: Houx Zhang




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092341#comment-13092341 ] 

Knut Anders Hatlen commented on DERBY-5301:
-------------------------------------------

derby.storage.rowLocking is a static property, so a reboot of the database is needed for it to take effect. I'd suggest using a DatabasePropertyTestSetup for this, which handles rebooting of the database if it's created with staticProperties=true. That will also reset the property when the test it done, so that it doesn't interfere with subsequent tests.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Houx Zhang updated DERBY-5301:
------------------------------

    Attachment: 5301-2-part.patch

Thanks for your valuable advice, Bryan and Knut. I have adjusted TableLockBasic.java based on Bryan's version, using DatabasePropertyTestSetUp to set derby.storage.rowLocking=false. However, a new failure is met in testDDLTableLockMode(). After executed

"create table default_granularity(c1 int);
create table row_granularity(c1 int);
alter table row_granularity locksize row;
create table table_granularity(c1 int);
alter table table_granularity locksize table;
select * from default_granularity with cs;"

"values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();" has got null, which is diffrent from the TableLockBasic.out.

Could you give any advice, please?

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090270#comment-13090270 ] 

Houx Zhang commented on DERBY-5301:
-----------------------------------

Besides, how to deal with "maximumdisplaywidth 2000;" in JUnit, please?

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092342#comment-13092342 ] 

Knut Anders Hatlen commented on DERBY-5301:
-------------------------------------------

> Besides, how to deal with "maximumdisplaywidth 2000;" in JUnit, please?

That command is only there so that ij doesn't truncate the result from SYSCS_GET_RUNTIMESTATISTICS. Since ResultSet.getString() will make the entire result available to the test without such magic, it can safely be skipped now when the test is written in JUnit.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092334#comment-13092334 ] 

Bryan Pendleton commented on DERBY-5301:
----------------------------------------

The test failures that you are seeing in your run are due to two reasons:

1) First, the output of SYSCS_GET_RUNTIMESTATISTICS contains literal tab characters (^I), but
your test program in the patch contains spaces. When I changed TableLockBasicTest.java to contain
the expected tab characters in the right places, the test passes in one configuration (embedded?) but
fails in the other configuration (client/server?) -- I may have the two configurations backward.

2) The remaining test failure is because the statement name is null in one configuration but is 
SQL_CURLH000C3 in the other configuration. That is, the remaining test failure that I see is:
1,2c1,2
<     Expected: >Statement Name: 
< 	null
---
>     Found:    >Statement Name: 
> 	SQL_CURLH000C3

Perhaps you could get around that by using 

    if (getTestConfiguration().getJDBCClient().isEmbedded())

to build a different expected result string for each configuration?

I'll attach the version of TableLockBasicTest.java that I've been fiddling with for you to
see what I did to make the tests pass.

thanks,

bryan




> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092345#comment-13092345 ] 

Knut Anders Hatlen commented on DERBY-5301:
-------------------------------------------

> It took me a while to figure this out because when this happens, the test case gets an assertion about
> the table-level locking problem, but then the tearDown() method gets another assertion, and that exception
> hides the test problem.

I think this is something that was fixed in JUnit 3.8.2, so that newer versions don't let failures in tearDown() hide failures in the test methods. In case you're still using JUnit 3.8.1 to run the tests.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Pendleton updated DERBY-5301:
-----------------------------------

    Attachment: TableLockBasicTest.java

Attached updated test program. It now passes for me!

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092335#comment-13092335 ] 

Bryan Pendleton edited comment on DERBY-5301 at 8/27/11 5:55 PM:
-----------------------------------------------------------------

Attached TableLockBasicTest.java.

With hard tabs, and statement name built based on test configuration. 

Passes for me, but only if I set  -Dderby.storage.rowLocking=false when running it; I'm not sure why that is.

      was (Author: bryanpendleton):
    With hard tabs, and statement name built based on test
configuration. Passes for me, but only if I set  
-Dderby.storage.rowLocking=false when running it; I'm not
sure why that is.
  
> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Pendleton resolved DERBY-5301.
------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.9.0.0
    Issue & fix info:   (was: [Patch Available])

Committed patch 3 to the trunk as revision 1163880.

Thank you for the contribution to Derby!


> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>             Fix For: 10.9.0.0
>
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, 5301-3.patch, 5301-3.stat, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Houx Zhang updated DERBY-5301:
------------------------------

    Issue & fix info: [Patch Available]

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, 5301-3.patch, 5301-3.stat, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Houx Zhang updated DERBY-5301:
------------------------------

    Attachment: 5301-1-part.patch

5301-1-part.patch has covered most of testing range, but is not the final patch. 

testRTSOutput() failed in my PC,  I haven't resolved even with a lot of time to debug. Maybe it has relation to "values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()" . 

Wish for your help, please!

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092346#comment-13092346 ] 

Bryan Pendleton commented on DERBY-5301:
----------------------------------------

Heh. I still operate this computer by turning the crank on the side :) That's a good suggestion,
I will try to upgrade to 3.8.2.


> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Houx Zhang updated DERBY-5301:
------------------------------

    Attachment: 5301-3.stat
                5301-3.patch

Hi, Bryan. It works now. The new patch  has finished all test cases, please check it.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, 5301-3.patch, 5301-3.stat, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Pendleton updated DERBY-5301:
-----------------------------------

    Attachment: junit.out

I wonder if I am not building/running the test properly. In my environment, I get a lot of failures. I am attaching the output of my test run.

Do you see similar output?


> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092314#comment-13092314 ] 

Houx Zhang commented on DERBY-5301:
-----------------------------------

Hi,Bryan. In my PC, the test just ran with one failure.

D:\derby\test>java junit.textui.TestRunner org.apache.derbyTesting.functionTests
.tests.store.TableLockBasicTest
..............F..............F
Time: 6.407
There were 2 failures:
1) testRTSOutput(org.apache.derbyTesting.functionTests.tests.store.TableLockBasi
cTest)junit.framework.AssertionFailedError: Column value mismatch @ column '1',
row 1:
    Expected: >Statement Name:
 null
Statement Text:
 select * from rts with cs
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:
Table Scan ResultSet for RTS at read committed isolation level using instantaneo
us share row locking chosen by the optimizer (Actual locking used: table level l
ocking.)
Number of opens = 1
Rows seen = 1
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=1
 Number of pages visited=1
 Number of rows qualified=1
 Number of rows visited=1
 Scan type=heap
 start position:
  null
 stop position:
  null
 qualifiers:
  None
optimizer estimated row count:            6.00
optimizer estimated cost:          100.40<
    Found:    >Statement Name:
        null
Statement Text:
        select * from rts with cs
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:
Table Scan ResultSet for RTS at read committed isolation level using instantaneo
us share row locking chosen by the optimizer (Actual locking used: table level l
ocking.)
Number of opens = 1
Rows seen = 1
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=1
        Number of pages visited=1
        Number of rows qualified=1
        Number of rows visited=1
        Scan type=heap
        start position:
                null
        stop position:
                null
        qualifiers:
                None
        optimizer estimated row count:            6.00
        optimizer estimated cost:          100.40<
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:121
3)
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:112
5)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.jav
a:1012)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:935)

        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:892)

        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:850)

        at org.apache.derbyTesting.functionTests.tests.store.TableLockBasicTest.
testRTSOutput(TableLockBasicTest.java:500)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
112)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
2) testRTSOutput(org.apache.derbyTesting.functionTests.tests.store.TableLockBasi
cTest)junit.framework.AssertionFailedError: Column value mismatch @ column '1',
row 1:
    Expected: >Statement Name:
 null
Statement Text:
 select * from rts with cs
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:
Table Scan ResultSet for RTS at read committed isolation level using instantaneo
us share row locking chosen by the optimizer (Actual locking used: table level l
ocking.)
Number of opens = 1
Rows seen = 1
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=1
 Number of pages visited=1
 Number of rows qualified=1
 Number of rows visited=1
 Scan type=heap
 start position:
  null
 stop position:
  null
 qualifiers:
  None
optimizer estimated row count:            6.00
optimizer estimated cost:          100.40<
    Found:    >Statement Name:
        SQL_CURLH000C3
Statement Text:
        select * from rts with cs
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:
Table Scan ResultSet for RTS at read committed isolation level using instantaneo
us share row locking chosen by the optimizer (Actual locking used: table level l
ocking.)
Number of opens = 1
Rows seen = 1
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=1
        Number of pages visited=1
        Number of rows qualified=1
        Number of rows visited=1
        Scan type=heap
        start position:
                null
        stop position:
                null
        qualifiers:
                None
        optimizer estimated row count:            6.00
        optimizer estimated cost:          100.40<
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:121
3)
        at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:112
5)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.jav
a:1012)
        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:935)

        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:892)

        at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:850)

        at org.apache.derbyTesting.functionTests.tests.store.TableLockBasicTest.
testRTSOutput(TableLockBasicTest.java:500)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
112)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.extensions.TestSetup.run(TestSetup.java:27)

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


D:\derby\test>

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094608#comment-13094608 ] 

Bryan Pendleton commented on DERBY-5301:
----------------------------------------

The most recent patch looks great to me. Both the old and new test suites pass
in my configuration, and the new test program looks thorough and complete.

I'm intending to commit this patch.


> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, 5301-3.patch, 5301-3.stat, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Pendleton updated DERBY-5301:
-----------------------------------

    Attachment: TableLockBasicTest.java

With hard tabs, and statement name built based on test
configuration. Passes for me, but only if I set  
-Dderby.storage.rowLocking=false when running it; I'm not
sure why that is.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093360#comment-13093360 ] 

Bryan Pendleton commented on DERBY-5301:
----------------------------------------

If I add the line:

        st.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");

at line 552 of TableLockBasicTest.java, then the runtime statistics come back non-null.

Then I also have to insert the literal TAB characters into the expected output, just like
we did with the other RTS test output, to make it match the actual results.

And, I have to adjust the statement name for embedded vs client/server.

I'll attach my updated test program in a sec...

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092331#comment-13092331 ] 

Bryan Pendleton commented on DERBY-5301:
----------------------------------------

For some reason, the test's setup code which is supposed to force table-level locking isn't working for me.

If I run the test with -Dderby.storage.rowLocking=false on the command line, then I see the same results
that you do. But if I don't specify that flag when I start junit, the test cases all fail because I am not doing
the expected table-level locking.

It took me a while to figure this out because when this happens, the test case gets an assertion about
the table-level locking problem, but then the tearDown() method gets another assertion, and that exception
hides the test problem.

I think it might be better to move the view-dropping code out of the tearDown method and into normal
subroutines that are called by each test case, to avoid this exception-hiding problem. Or maybe the tearDown
method should catch and ignore any exceptions that occur in that method?


> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: 5301-1-part.patch, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5301) Convert store/TableLockBasic.sql to junit

Posted by "Houx Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Houx Zhang closed DERBY-5301.
-----------------------------


Thanks for your advice on this issue, Bryan.

> Convert store/TableLockBasic.sql  to junit
> ------------------------------------------
>
>                 Key: DERBY-5301
>                 URL: https://issues.apache.org/jira/browse/DERBY-5301
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>             Fix For: 10.9.0.0
>
>         Attachments: 5301-1-part.patch, 5301-2-part.patch, 5301-3.patch, 5301-3.stat, TableLockBasicTest.java, TableLockBasicTest.java, junit.out
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira