db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2031) Convert derbynet/testProtocol.java to JUnit
Date Fri, 20 Jun 2008 14:25:45 GMT

     [ 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.


Mime
View raw message