db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Zaun (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3543) NetworkServerControl with options but no command does not give usage message
Date Tue, 15 Apr 2008 23:24:24 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Zaun updated DERBY-3543:
-------------------------------

    Attachment: DERBY-3542-1.diff
                DERBY-3542-1.stat


Dyre Tjeldvoll wrote:
> I definitely think you are onto something here. I definitely think option handling for
the server needs an overhaul.

I wholeheartedly agree.  Just that my patch attempts a cleanup of only a single issue as a
first step...

Please, find attached the updated patch DERBY-3542-1 (replacing the former patch). The derbyall
and junit-all suites pass with no issues.

This patch update:

1) Fixes the issue in ServerPropertiesTest..testWrongCommands(), which I consider a test case
bug -- or a really weird behaviour of NetworkServerControl:
    a) When no command was given, NSC exits with a usage message and an error.  Fine.
    b) When an illegal command was given, NSC exits with a usage message but NO error.

    I changed the test to expect an error return value for case b).

2) Changes thekey and text of an error message from DRDA_NoArgs.U to
       DRDA_NoCommand.U=No command given.
    to cover the case that some options were given (like "-h") but no command (like "start").
 This is the actual case this JIRA was filed for.

3) Moves the method  testWrongCommands() from ServerPropertiesTest.java to NetworkServerControlApiTest.java.
 Note that the author had put into a code comment that this method may not be in the right
place:
    *   Note: maybe these test cases should be moved to another Test,
    *   as they don't actually test any properties. 

While the patch now passes the test suites, it would still be useful if other developers with
more knowledge of (the history of) NetworkServerControl could have a look and comment on the
underlying assumption that there's no support of a default command (btw, the admin guide either
doesn't mention any), i.e., users must always provide a command, with or without additional
options.

Martin


> NetworkServerControl with options but no command does not give usage message
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-3543
>                 URL: https://issues.apache.org/jira/browse/DERBY-3543
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.4.1.0, 10.5.0.0
>            Reporter: Kathey Marsden
>            Assignee: Martin Zaun
>            Priority: Minor
>         Attachments: DERBY-3542-0_experimental.diff, DERBY-3542-0_experimental.stat,
DERBY-3542-1.diff, DERBY-3542-1.stat
>
>
> I noticed that 
> java org.apache.derby.drda.NetworkServerControl  -user mary -password mypass
> with no actual command just completes with no usage message.

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