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 "Kathey Marsden (JIRA)" <ji...@apache.org> on 2013/04/09 04:03:14 UTC

[jira] [Created] (DERBY-6159) JUnit tests (e.g. NetworkServerControlApi) should not check messages literally

Kathey Marsden created DERBY-6159:
-------------------------------------

             Summary: JUnit tests  (e.g. NetworkServerControlApi) should not check messages literally
                 Key: DERBY-6159
                 URL: https://issues.apache.org/jira/browse/DERBY-6159
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.10.1.1
            Reporter: Kathey Marsden
            Priority: Minor


If possible, JUnit tests should not check the literal value of messages that are likely to change. 
This makes frequent updates necessary and is not really a valid functional test as the messages are unstable.

e.g. NetworkServerControlApiTest compares the full usage message.

        assertExecJavaCmdAsExpected(new String[]{
                "Invalid value, -12, for maxthreads.",
                "Usage: NetworkServerControl <commands>",
                "Commands:",
                "start [-h <host>] [-p <port number>] [-noSecurityManager] [-ssl <ssl mode>]",
                "shutdown [-h <host>][-p <port number>] [-ssl <ssl mode>] [-user <username>] [-password <password>]",
                "ping [-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "sysinfo [-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "runtimeinfo [-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "logconnections { on|off } [-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "maxthreads <max>[-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "timeslice <milliseconds>[-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "trace { on|off } [-s <session id>][-h <host>][-p <port number>] [-ssl <ssl mode>]",
                "tracedirectory <trace directory>[-h <host>][-p <port number>] [-ssl <ssl mode>]",



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira