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:45:18 UTC

[jira] [Created] (DERBY-5303) Convert tools/URLCheck.sql to junit

Convert tools/URLCheck.sql to junit
-----------------------------------

                 Key: DERBY-5303
                 URL: https://issues.apache.org/jira/browse/DERBY-5303
             Project: Derby
          Issue Type: 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] [Updated] (DERBY-5303) Convert tools/URLCheck.sql to junit

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

Houx Zhang updated DERBY-5303:
------------------------------

    Attachment: derby-5303-3.stat
                derby-5303-3.patch
                derby-5303-2.stat
                derby-5303-2.patch

Hi, Bryan, I have change LocalizedResource.out to get the correct result in 5303-2.patch and 5303-3.patch.

5303-2.patch and 5303-3.patch is different, 5303-3.patch just adds URLCheck.sql into ToolScripts.java instead of adding a new URLCheckTest class. However, I'm not sure it's right to ignore URLCheck_app.properties in this situation, so wish for your opinion on these two patches.



> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
>                 Key: DERBY-5303
>                 URL: https://issues.apache.org/jira/browse/DERBY-5303
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch, derby-5303-2.patch, derby-5303-2.stat, derby-5303-3.patch, derby-5303-3.stat
>
>


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

        

[jira] [Closed] (DERBY-5303) Convert tools/URLCheck.sql to junit

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

Houx Zhang closed DERBY-5303.
-----------------------------


Thanks for your checking and advice, Bryan!

> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
>                 Key: DERBY-5303
>                 URL: https://issues.apache.org/jira/browse/DERBY-5303
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>             Fix For: 10.9.0.0
>
>         Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch, derby-5303-2.patch, derby-5303-2.stat, derby-5303-3.patch, derby-5303-3.stat
>
>


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

        

[jira] [Updated] (DERBY-5303) Convert tools/URLCheck.sql to junit

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

Houx Zhang updated DERBY-5303:
------------------------------

    Attachment: derby-5303-1-URLCheck.out
                derby-5303-1.patch

Ask for help:

when ran the URLCheckTest in patch -1, the test failed with the output file -1. Besides, in my console, I got:

URL Attribute [unknown=x]
   Attribute is unknown to Derby.
URL Attribute [dataEncryption=true]
   Attribute is a duplicate.
URL Attribute [dataEncryption=false]
   Attribute is a duplicate.
URL Attribute [dataencryption=true]
   Attribute is unknown to Derby.

it's just the missing info that -1.out failed because of. If add them into .out, the test will pass.

Why the console ouput the messages above, please? How to convert them into the .output file?

Thanks!

> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
>                 Key: DERBY-5303
>                 URL: https://issues.apache.org/jira/browse/DERBY-5303
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch
>
>


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

        

[jira] [Resolved] (DERBY-5303) Convert tools/URLCheck.sql to junit

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

Bryan Pendleton resolved DERBY-5303.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.9.0.0

All other things being equal, the simpler patch seems better to me,
so I think patch-3 is therefore preferable to patch-2.

I don't believe any of the properties in the properties file are
needed by the test, so I think we can move ahead with this approach.

derby-5303-3.patch runs great in my environment, so I committed
it to the trunk as revision 1144123.

Thank you for the contribution!


> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
>                 Key: DERBY-5303
>                 URL: https://issues.apache.org/jira/browse/DERBY-5303
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>             Fix For: 10.9.0.0
>
>         Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch, derby-5303-2.patch, derby-5303-2.stat, derby-5303-3.patch, derby-5303-3.stat
>
>


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

        

[jira] [Commented] (DERBY-5303) Convert tools/URLCheck.sql to junit

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

Bryan Pendleton commented on DERBY-5303:
----------------------------------------

It looks to me as though CanonTestCase tries to capture the output in a ByteArrayOutputStream,
but LocalizedResource.OutputWriter sends its output directly to System.out, and doesn't make
provision for directing the output elsewhere.

I wonder if it would help to make a subclass of ScriptTestCase which overrides CanonTestCase.getOutputStream
so that, in addition to fabricating the test output stream, we also call System.setOut() to tell
System.out to redirect its output to the CanonTestCase's output stream?

Alternatively, and perhaps better, in ij.java, around line 110, when ij.runScript() is calling
LocalizedResource.getNewOutput(sqlOut), perhaps we could create a new LocalizedResource.setOutput()
method which we could pass the LocalizedOutput object to, and it would reset the "out" field
in the LocalizedResource class to point to the new LocalizedOutput object, rather than the
one which points to System.out.

What do you think?

> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
>                 Key: DERBY-5303
>                 URL: https://issues.apache.org/jira/browse/DERBY-5303
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>            Reporter: Houx Zhang
>            Assignee: Houx Zhang
>              Labels: gsoc2011
>         Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch
>
>


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