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 2006/11/02 17:54:18 UTC

[jira] Created: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Convert derbynet/testProtocol.java to JUnit
-------------------------------------------

                 Key: DERBY-2031
                 URL: http://issues.apache.org/jira/browse/DERBY-2031
             Project: Derby
          Issue Type: Improvement
          Components: Network Server, Test
    Affects Versions: 10.3.0.0
            Reporter: Knut Anders Hatlen
            Priority: Minor


testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.

Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Julius Stroffek (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2031?page=all ]

Julius Stroffek updated DERBY-2031:
-----------------------------------

    Derby Info: [Patch Available]

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: http://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Julius Stroffek
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Attachment: derby-2031-1a-grammar_enum.stat
                derby-2031-1a-grammar_enum.diff

'derby-2031-1a-grammar_enum.diff' adds a grammar enum, describing the "protocol test language". There is no description of the arguments each command take.

My plan is to convert TestProto to a package-private test first. We can decide what to do with it later.
I have chosen to use Java SE 5.0 features for this test. Note that the test is being run today as part of derbyall (testProtocol), and my work on this issue will not affect that.

Besides from the test conversion itself, I know there are some issues:
 a) Security manager (permissions, different codebase)
 b) Only runnable from classes (sealing, packaging, special VM options)

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan commented on DERBY-2031:
----------------------------------------

Renamed the file TestProto to ProtocolTest with revision 667099.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Assignee: Kristian Waagan  (was: Julius Stroffek)

I hijacked this issue, since there has been no activity on it for a long time.

I'm taking another stab at rewriting the test into JUnit.
I will utilize the package-private test "framework", and because this is far from complete I will develop the JUnit version in parallel to the existing one.

The main problems are still running the package private tests in a Jar-file environment due to package sealing.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kathey Marsden commented on DERBY-2031:
---------------------------------------

There weas a problem with the new StressMultiTest removing the database directory because of  DERBY-3789.  Erlend was able to workaround that problem by making sure all the result sets were closed.  In this case it was not the database directory I think, but rather the test include file connect.inc. There must be a problem with the protocol test that it leaves a filie handle open to the include file.


> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kathey Marsden commented on DERBY-2031:
---------------------------------------

I played with this a little bit and see 
1) You can only run with classes and classes.pptesting.  It doesn't seem to work with jars.
2) I am getting a failure on Windows XP trying to remove a file.
 Derby DRDA protocol testsjunit.framework.AssertionFailedError: extin\connect.inc
        at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:130)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35)
        at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98)
        at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:127)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
        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)
        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)


> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Derby Info: [Patch Available]

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541784 ] 

Kristian Waagan commented on DERBY-2031:
----------------------------------------

As a first step I copied the existing file to another location with revision 594156 and replaced all tab-characters and added some blank lines with revision 594157.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Issue Comment Edited: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

kmarsden edited comment on DERBY-2031 at 7/29/08 6:04 AM:
----------------------------------------------------------------

There was a problem with the new StressMultiTest removing the database directory because of  DERBY-3789.  Erlend was able to workaround that problem by making sure all the result sets were closed.  In this case it was not the database directory I think, but rather the test include file connect.inc. There must be a problem with the protocol test that it leaves a file handle open to the include file.


      was (Author: kmarsden):
    There weas a problem with the new StressMultiTest removing the database directory because of  DERBY-3789.  Erlend was able to workaround that problem by making sure all the result sets were closed.  In this case it was not the database directory I think, but rather the test include file connect.inc. There must be a problem with the protocol test that it leaves a filie handle open to the include file.

  
> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Attachment: derby-2031-2a-test.diff

'derby-2031-2a-test.diff' is the first attempt of a conversion.

To run it under a security manager, the following permissions must be granted (or just grant all for testing purposes):
//grant codeBase "${derbyTesting.ppcodeclasses}" { // Commented out, not yet in trunk
grant {

  // Allow connection to a server.
  permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
  permission java.net.SocketPermission "localhost", "connect,resolve";
  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";

  // Import/export and other support files from these locations in tests
  permission java.io.FilePermission "${user.dir}${/}extin${/}-", "read";
};


This patch will add 150 tests to the package-private test suite (followup patch), base on the current 'protocol.tests' file.
Patch ready for review.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Attachment: derby-2031-3a-enable_test.stat
                derby-2031-3a-enable_test.diff

'derby-2031-3a-enable_test.diff' enables ProtocolTest as part of the package private test suite.
To run it, execute "ant junit-pptesting" (at the moment it should run 250 tests with the patch applied).

The only thing out of the ordinary with this patch, is that I had to do some changes to SecurityMangerSetup. I would like to know if people find the change ok.

Patch ready for review.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kathey Marsden commented on DERBY-2031:
---------------------------------------

Can the package-private tests be pullled into suites.All or do they have to be run separately?


> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan commented on DERBY-2031:
----------------------------------------

I think we are still running two versions of the test; one with an adapter in the drda package (to avoid making a set of methods public), and the new JUnit test.
The reason why the latter hasn't replaced the old test, is the packaging problem. Due to this, the test is only run when running against classes, and it isn't run as part of suites.All.
Changes done to the protocol test file will affect both versions of the test.

One way forward could be to write a smaller adapter and have the new JUnit test use it to be able to run the test against the JARs (I haven't investigated this approach).

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff, derby-2031-4a-close_streams.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan commented on DERBY-2031:
----------------------------------------

Committed patch 4a to trunk with revision 681302.
I verified the fix with Cygwin on Windows XP; the test failed without the patch and succeeded after it was applied.

Thanks for brining up the issue, Kathey.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff, derby-2031-4a-close_streams.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Myrna van Lunteren updated DERBY-2031:
--------------------------------------

    Fix Version/s:     (was: 10.5.0.0)

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff, derby-2031-4a-close_streams.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

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

The changes look OK to me. Perhaps a small comment could be added in SecurityManagerTestSetup to explain when ppTesting is null and non-null. I tried the junit-pptesting target and all the tests ran successfully.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan commented on DERBY-2031:
----------------------------------------

Currently it is only possible to easily run the tests from classes.

Technically it is possible to run from jars in at least three ways, all with some disadvantages:
 a) Use unsealed jars.
 b) Include the tests in the production jars.
 c) Run with the jars in the boot classpath.

Note that these approaches can be used "temporarily", i.e. only to run the tests and not for the distribution jars.

Regarding the failure, I haven't tested on Windows. Wasn't there a similar problem with another test reported not so long ago?

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-2031?page=comments#action_12459049 ] 
            
Bryan Pendleton commented on DERBY-2031:
----------------------------------------

It seems undesirable to have to change the visibility of the actual code.
I remember that we've had some similar discussions on the mailing
list recently. For example, http://www.nabble.com/Re%3A-JUnit-unit-tests---parallel-test-three--p5711307.html
Unfortunately, I can't remember what we decided was the best technique
for situations such as yours.


> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: http://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Julius Stroffek
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Attachment: derby-2031-3b-enable_test.diff

Thanks for looking at the patch Knut Anders :)

Attached and committed patch 3b to trunk with revision 672770.
Revision 3b added a comment as suggested by Knut Anders.

I have not yet resolved this issue nor deleted the old test, because I don't believe anyone is running the package-private tests on a regular basis.
I'm wondering what it takes to make that happen...

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Myrna van Lunteren updated DERBY-2031:
--------------------------------------

    Derby Info:   (was: [Patch Available])

switching off patch available, as Bryan said, it may not be proper to change the visibility. In the mean time, this test is running as a junit test vai the JavaHarnessTest. Not exactly a conversion, but a step in the direction.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Julius Stroffek
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Assigned: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Julius Stroffek (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2031?page=all ]

Julius Stroffek reassigned DERBY-2031:
--------------------------------------

    Assignee: Julius Stroffek

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: http://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Julius Stroffek
>            Priority: Minor
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------


Committed 'derby-2031-2a-test.diff' to trunk with revision 670526.
Another patch will follow to enable the test as part of the package-private test ant target.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

       Derby Info:   (was: [Patch Available])
    Fix Version/s: 10.5.0.0

Committed 'derby-2031-1a-grammar_enum.diff' to trunk with revision 669810.
This only adds a grammar class, which will be used by the test.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Derby Info: [Patch Available]

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Julius Stroffek (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-2031?page=all ]

Julius Stroffek updated DERBY-2031:
-----------------------------------

    Attachment: d2031.diff
                d2031.stat

Attaching a proposed patch.

I moved the implementation of the test from the org.apache.derby.impl.drda package to org.apache.derbyTesting.functionTests.tests.derbynet.DRDAProtocolTest class.

This required to change the visibility of some classes and methods in the drda to be accessible by the test.

Actually I had two choices how to handle the test:

1.) Write a test inside the drda package as it was before using the junit.
        - this will require the junit jar files to build a derby and som classes in derby.jar will be linked against junit.jar.
        - the location of test will be non standard

2.) Change the visibility of some methods of drda protocol implementation to public
        - The instances of som of these classes might be created somewhere else however the instances created in derby network server are still hidden for other packages. Simply said, one can create DDMReader or DDMWriter instances and call some of their methods, however it is not possible to access the corresponding instances of these classes used by the server.

I implemented the patch according the option 2.)

I am interested in your comments on this.

I ran derbyall and suites.All suites without failures.


> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: http://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Julius Stroffek
>            Priority: Minor
>         Attachments: d2031.diff, d2031.stat
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688202#action_12688202 ] 

Myrna van Lunteren commented on DERBY-2031:
-------------------------------------------

I'd like to close this one as fixed in 10.5. Objections?

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff, derby-2031-4a-close_streams.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Attachment: derby-2031-4a-close_streams.diff

'derby-2031-4a-close_streams.diff' closes the opened readers/inputstreams.
I haven't tested the patch on Windows, but hopefully it fixes the failure seen there.

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff, derby-2031-4a-close_streams.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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


[jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit

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

Kristian Waagan updated DERBY-2031:
-----------------------------------

    Derby Info:   (was: [Patch Available])

> Convert derbynet/testProtocol.java to JUnit
> -------------------------------------------
>
>                 Key: DERBY-2031
>                 URL: https://issues.apache.org/jira/browse/DERBY-2031
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server, Test
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d2031.diff, d2031.stat, derby-2031-1a-grammar_enum.diff, derby-2031-1a-grammar_enum.stat, derby-2031-2a-test.diff, derby-2031-3a-enable_test.diff, derby-2031-3a-enable_test.stat, derby-2031-3b-enable_test.diff
>
>
> testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.
> Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

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