Derby
  1. Derby
  2. DERBY-4765

Convert "org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServer" to junit.

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.7.1.1
    • Component/s: Test
    • Labels:
      None
    1. derby-4765-1.stat
      0.6 kB
      Yun Lee
    2. derby-4765-1.patch
      13 kB
      Yun Lee
    3. derby-4765.stat
      0.5 kB
      Yun Lee
    4. derby-4765.patch
      12 kB
      Yun Lee

      Issue Links

        Activity

        Hide
        Yun Lee added a comment -

        Please check the patch. Any comment is welcome.

        Show
        Yun Lee added a comment - Please check the patch. Any comment is welcome.
        Hide
        Myrna van Lunteren added a comment -

        Thanks for this patch!

        These are my comments:

        • the old test was activated from NetHarnessTest.java. You can see there, that it cannot run with J2ME.
          This needs to be preserved. You need to add the appropriate check - if (JDBC.vmSupportsJDBC3()) - to the suite() method, and it needs to go into a special section, with comments, in derbynet._Suite.java
        • I don't see that there's any checking done for a successful start of the networkserver. This can be accomplished by calling NetworkServerTestSetup. waitForServerStart(NetworkServerControl networkServerController)

        nits:

        • the old test needs to be removed from NetHarnessTest.java
        • we've lost the comment of DERBY-1466. It's an explanation of why there's no setting of setting of 'autoflush'. I think it makes sense to preserve that comment.
        Show
        Myrna van Lunteren added a comment - Thanks for this patch! These are my comments: the old test was activated from NetHarnessTest.java. You can see there, that it cannot run with J2ME. This needs to be preserved. You need to add the appropriate check - if (JDBC.vmSupportsJDBC3()) - to the suite() method, and it needs to go into a special section, with comments, in derbynet._Suite.java I don't see that there's any checking done for a successful start of the networkserver. This can be accomplished by calling NetworkServerTestSetup. waitForServerStart(NetworkServerControl networkServerController) nits: the old test needs to be removed from NetHarnessTest.java we've lost the comment of DERBY-1466 . It's an explanation of why there's no setting of setting of 'autoflush'. I think it makes sense to preserve that comment.
        Hide
        Yun Lee added a comment -

        Hi, Myrna. Thanks for your advice! I've improved my patch, and submitted a new one, please check it, thanks!

        Show
        Yun Lee added a comment - Hi, Myrna. Thanks for your advice! I've improved my patch, and submitted a new one, please check it, thanks!
        Hide
        Myrna van Lunteren added a comment -

        Thanks Yun for the updated patch.
        I made 3 tiny changes:

        • changed the text for the asserts because it suggested the pings would add text to the log; they don't (in the original test, the connections did, but now it's only the start and shutdown text).
        • moved the assert for empty log up to before the server.start
          This seems a bit superfluous, but I wanted to prevent the unlikely situation that the text would already be there by the time the assert was done; which could possibly result in false failures.
        • rearranged the tests in _Suite.java so there's only one if (JDBC.vmSupportsJDBC3()) block.

        committed with revision 985400.

        Show
        Myrna van Lunteren added a comment - Thanks Yun for the updated patch. I made 3 tiny changes: changed the text for the asserts because it suggested the pings would add text to the log; they don't (in the original test, the connections did, but now it's only the start and shutdown text). moved the assert for empty log up to before the server.start This seems a bit superfluous, but I wanted to prevent the unlikely situation that the text would already be there by the time the assert was done; which could possibly result in false failures. rearranged the tests in _Suite.java so there's only one if (JDBC.vmSupportsJDBC3()) block. committed with revision 985400.
        Hide
        Yun Lee added a comment -

        Thanks, Myrna!

        Show
        Yun Lee added a comment - Thanks, Myrna!

          People

          • Assignee:
            Yun Lee
            Reporter:
            Yun Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development