Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3151

Reduce dependency on NetworkServerControl in TestConfiguration



    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s:
    • Fix Version/s:
    • Component/s: Test
    • Labels:


      Code has been added in TestConfiguration to allow for starting and stopping a Derby network server.
      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?


        1. derby-3151-4b-wrapper_with_reflection.diff
          7 kB
          Kristian Waagan
        2. derby-3151-4b-wrapper_with_reflection.diff
          7 kB
          Kristian Waagan
        3. derby-3151-4a-wrapper_with_reflection.diff
          7 kB
          Kristian Waagan
        4. derby-3151-2b-wrapper.diff
          5 kB
          Kristian Waagan
        5. derby-3151-3a-test.diff
          1 kB
          Kristian Waagan
        6. derby-3151-2a-wrapper.stat
          0.2 kB
          Kristian Waagan
        7. derby-3151-2a-wrapper.diff
          5 kB
          Kristian Waagan
        8. derby-3151-1a-proposal.diff
          2 kB
          Kristian Waagan



            • Assignee:
              kristwaa Kristian Waagan
              kristwaa Kristian Waagan
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: