db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3151) Reduce dependency on NetworkServerControl in TestConfiguration
Date Wed, 18 Jun 2008 01:10:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605796#action_12605796

Dag H. Wanvik commented on DERBY-3151:

Looks good to me, +1.Just some nits (non-blockers):

* header of NetworkServerControlWrapper
  - is depending -> depends        
  - typo: reqired

* Is the NO_ARGS and NO_ARGS_CLASS objects really needed? I think you
  can just use "null". E.g., quoting from Method#invoke JavaDoc:

  "If the number of formal parameters required by the underlying
  method is 0, the supplied args array may be of length 0 or null.

I tried to see if this patch changed anything by removing derbynet.jar
and derbyrun.jar from my classpatch a running a test which uses


but in my environment that worked even without the patch (the
decorator omits the test), cf. TestConfiguration#defaultServerDecorator 
which tests if there are suitable jars available.  But perhaps this is a
problem for other environments like JME (?).

> Reduce dependency on NetworkServerControl in TestConfiguration
> --------------------------------------------------------------
>                 Key: DERBY-3151
>                 URL: https://issues.apache.org/jira/browse/DERBY-3151
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3151-1a-proposal.diff, derby-3151-2a-wrapper.diff, derby-3151-2a-wrapper.stat,
derby-3151-2b-wrapper.diff, derby-3151-3a-test.diff, derby-3151-4a-wrapper_with_reflection.diff
> Code has been added in TestConfiguration to allow for starting and stopping a Derby network
> Even if you know will not need this functionality, or you simply don't want to have this
functionality available, you must include derbynet.jar (or point to classes/).
> I think this dependency should be reduced, by not having any instance variables and by
not importing the class with an explicit import statement. The existing instance variables
are not used.
> With this planned change, you can run tests without including derbynet.jar on the classpath,
as long as they don't call 'startNetworkServer' or 'stopNetworkServer'. Most often these methods
will be called by a decorator.
> The downside of this change, is that you won't get any error messages before the mentioned
methods are actually executed.
> A typical error message:
> Failed to invoke suite():java.lang.NoClassDefFoundError: org/apache/derby/drda/NetworkServerControl
> I'm sure there are other solutions as well, but this one is really easy.
> Any opinions on this change?

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

View raw message