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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2008/06/30 10:37:45 UTC

[jira] Created: (DERBY-3742) Move test code from CompressedNumber to a unit test

Move test code from CompressedNumber to a unit test
---------------------------------------------------

                 Key: DERBY-3742
                 URL: https://issues.apache.org/jira/browse/DERBY-3742
             Project: Derby
          Issue Type: Test
          Components: Test
            Reporter: Knut Anders Hatlen
            Priority: Minor


The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Commented: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

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

Thanks for volunteering! I think this test could be put in java/testing/org/apache/derbyTesting/unitTests/junit/. That's where we have put JUnit tests that use the internal API before.

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Commented: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

Junjie Peng commented on DERBY-3742:
------------------------------------

Hi, Knut. I have read through  checkInt(), checkLong() and main(), and understood its workflow, but I have a question, which directory under org.apache.derbyTesting should  I put the new junit test case? Thank you!

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Commented: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

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

Thanks for the patch, Junjie! I added a couple of line breaks so that no lines were longer than 80 characters and committed the patch with revision 673057.

A couple of additional things that could be done:

1) The test should be added to the _Suite class in the unitTest/junit directory to make it run with the rest of the regression tests.

2) The original code also verified that the compressed length was increased at the correct boundaries (it only printed it, though). Perhaps it is possible to add some code to checkInt() and checkLong() to see that the length is as expected? Currently, it compares the return value from sizeInt() with the actual length, which is fine, but it would be good also to verify that sizeInt() and sizeLong() return the correct value.

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>         Attachments: derby-3742-patch.txt
>
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Updated: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

Junjie Peng updated DERBY-3742:
-------------------------------

    Attachment: derby-3742-patch.txt

It's a pleasure, Knut. I have finished it. Please check the patch.

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>         Attachments: derby-3742-patch.txt
>
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Updated: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

Junjie Peng updated DERBY-3742:
-------------------------------

    Attachment: derby-3742-1-patch.txt

Hi, Knut. It's a new patch with the changes you suggested. Please check it.

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>         Attachments: derby-3742-1-patch.txt, derby-3742-patch.txt
>
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Assigned: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

Junjie Peng reassigned DERBY-3742:
----------------------------------

    Assignee: Junjie Peng

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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


[jira] Closed: (DERBY-3742) Move test code from CompressedNumber to a unit test

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

Knut Anders Hatlen closed DERBY-3742.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.5.0.0

Thanks again, Junjie! Committed revision 673328.

> Move test code from CompressedNumber to a unit test
> ---------------------------------------------------
>
>                 Key: DERBY-3742
>                 URL: https://issues.apache.org/jira/browse/DERBY-3742
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3742-1-patch.txt, derby-3742-patch.txt
>
>
> The class org.apache.derby.iapi.services.io.CompressedNumber contains a significant amount of test code. This code should be moved into a unit test to reduce the footprint of the product jars and to ensure that the code is tested in the regression tests. The test code is located in the methods checkInt(), checkLong() and main().

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