Derby
  1. Derby
  2. DERBY-2031

Convert derbynet/testProtocol.java to JUnit

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.9.1.0
    • Component/s: Network Server, Test
    • Labels:
      None

      Description

      testProtocol.java executes DRDA commands from a file written in a special-purpose language. The statements are very much like assertions, so it should be fairly easy to convert the test to JUnit.

      Suggested approach: Change the interpreter (TestProto.java) so that is uses Assert.fail() instead of System.err.println() and System.exit(), and BaseTestCase.println() instead of System.out.println(). It should also use TestConfiguration to get the host name and port number.

      1. derby-2031-7a-old_harness_test_removal.stat
        1 kB
        Kristian Waagan
      2. derby-2031-7a-old_harness_test_removal.diff
        63 kB
        Kristian Waagan
      3. derby-2031-6a-pptesting_removal.stat
        0.2 kB
        Kristian Waagan
      4. derby-2031-6a-pptesting_removal.diff
        38 kB
        Kristian Waagan
      5. derby-2031-5b-new_adapter.diff
        48 kB
        Kristian Waagan
      6. derby-2031-5a-new_adapter.stat
        0.9 kB
        Kristian Waagan
      7. derby-2031-5a-new_adapter.diff
        47 kB
        Kristian Waagan
      8. derby-2031-pre_with_git.stat
        1 kB
        Kristian Waagan
      9. derby-2031-pre_with_git.diff
        102 kB
        Kristian Waagan
      10. derby-2031-4a-close_streams.diff
        1 kB
        Kristian Waagan
      11. derby-2031-3b-enable_test.diff
        5 kB
        Kristian Waagan
      12. derby-2031-3a-enable_test.stat
        0.3 kB
        Kristian Waagan
      13. derby-2031-3a-enable_test.diff
        5 kB
        Kristian Waagan
      14. derby-2031-2a-test.diff
        54 kB
        Kristian Waagan
      15. derby-2031-1a-grammar_enum.stat
        0.2 kB
        Kristian Waagan
      16. derby-2031-1a-grammar_enum.diff
        5 kB
        Kristian Waagan
      17. d2031.diff
        129 kB
        Julius Stroffek
      18. d2031.stat
        0.9 kB
        Julius Stroffek

        Issue Links

          Activity

          Hide
          Julius Stroffek added a comment -

          Attaching a proposed patch.

          I moved the implementation of the test from the org.apache.derby.impl.drda package to org.apache.derbyTesting.functionTests.tests.derbynet.DRDAProtocolTest class.

          This required to change the visibility of some classes and methods in the drda to be accessible by the test.

          Actually I had two choices how to handle the test:

          1.) Write a test inside the drda package as it was before using the junit.

          • this will require the junit jar files to build a derby and som classes in derby.jar will be linked against junit.jar.
          • the location of test will be non standard

          2.) Change the visibility of some methods of drda protocol implementation to public

          • The instances of som of these classes might be created somewhere else however the instances created in derby network server are still hidden for other packages. Simply said, one can create DDMReader or DDMWriter instances and call some of their methods, however it is not possible to access the corresponding instances of these classes used by the server.

          I implemented the patch according the option 2.)

          I am interested in your comments on this.

          I ran derbyall and suites.All suites without failures.

          Show
          Julius Stroffek added a comment - Attaching a proposed patch. I moved the implementation of the test from the org.apache.derby.impl.drda package to org.apache.derbyTesting.functionTests.tests.derbynet.DRDAProtocolTest class. This required to change the visibility of some classes and methods in the drda to be accessible by the test. Actually I had two choices how to handle the test: 1.) Write a test inside the drda package as it was before using the junit. this will require the junit jar files to build a derby and som classes in derby.jar will be linked against junit.jar. the location of test will be non standard 2.) Change the visibility of some methods of drda protocol implementation to public The instances of som of these classes might be created somewhere else however the instances created in derby network server are still hidden for other packages. Simply said, one can create DDMReader or DDMWriter instances and call some of their methods, however it is not possible to access the corresponding instances of these classes used by the server. I implemented the patch according the option 2.) I am interested in your comments on this. I ran derbyall and suites.All suites without failures.
          Hide
          Bryan Pendleton added a comment -

          It seems undesirable to have to change the visibility of the actual code.
          I remember that we've had some similar discussions on the mailing
          list recently. For example, http://www.nabble.com/Re%3A-JUnit-unit-tests---parallel-test-three--p5711307.html
          Unfortunately, I can't remember what we decided was the best technique
          for situations such as yours.

          Show
          Bryan Pendleton added a comment - It seems undesirable to have to change the visibility of the actual code. I remember that we've had some similar discussions on the mailing list recently. For example, http://www.nabble.com/Re%3A-JUnit-unit-tests---parallel-test-three--p5711307.html Unfortunately, I can't remember what we decided was the best technique for situations such as yours.
          Hide
          Myrna van Lunteren added a comment -

          switching off patch available, as Bryan said, it may not be proper to change the visibility. In the mean time, this test is running as a junit test vai the JavaHarnessTest. Not exactly a conversion, but a step in the direction.

          Show
          Myrna van Lunteren added a comment - switching off patch available, as Bryan said, it may not be proper to change the visibility. In the mean time, this test is running as a junit test vai the JavaHarnessTest. Not exactly a conversion, but a step in the direction.
          Hide
          Kristian Waagan added a comment -

          I hijacked this issue, since there has been no activity on it for a long time.

          I'm taking another stab at rewriting the test into JUnit.
          I will utilize the package-private test "framework", and because this is far from complete I will develop the JUnit version in parallel to the existing one.

          The main problems are still running the package private tests in a Jar-file environment due to package sealing.

          Show
          Kristian Waagan added a comment - I hijacked this issue, since there has been no activity on it for a long time. I'm taking another stab at rewriting the test into JUnit. I will utilize the package-private test "framework", and because this is far from complete I will develop the JUnit version in parallel to the existing one. The main problems are still running the package private tests in a Jar-file environment due to package sealing.
          Hide
          Kristian Waagan added a comment -

          As a first step I copied the existing file to another location with revision 594156 and replaced all tab-characters and added some blank lines with revision 594157.

          Show
          Kristian Waagan added a comment - As a first step I copied the existing file to another location with revision 594156 and replaced all tab-characters and added some blank lines with revision 594157.
          Hide
          Kristian Waagan added a comment -

          Renamed the file TestProto to ProtocolTest with revision 667099.

          Show
          Kristian Waagan added a comment - Renamed the file TestProto to ProtocolTest with revision 667099.
          Hide
          Kristian Waagan added a comment -

          'derby-2031-1a-grammar_enum.diff' adds a grammar enum, describing the "protocol test language". There is no description of the arguments each command take.

          My plan is to convert TestProto to a package-private test first. We can decide what to do with it later.
          I have chosen to use Java SE 5.0 features for this test. Note that the test is being run today as part of derbyall (testProtocol), and my work on this issue will not affect that.

          Besides from the test conversion itself, I know there are some issues:
          a) Security manager (permissions, different codebase)
          b) Only runnable from classes (sealing, packaging, special VM options)

          Show
          Kristian Waagan added a comment - 'derby-2031-1a-grammar_enum.diff' adds a grammar enum, describing the "protocol test language". There is no description of the arguments each command take. My plan is to convert TestProto to a package-private test first. We can decide what to do with it later. I have chosen to use Java SE 5.0 features for this test. Note that the test is being run today as part of derbyall (testProtocol), and my work on this issue will not affect that. Besides from the test conversion itself, I know there are some issues: a) Security manager (permissions, different codebase) b) Only runnable from classes (sealing, packaging, special VM options)
          Hide
          Kristian Waagan added a comment -

          Committed 'derby-2031-1a-grammar_enum.diff' to trunk with revision 669810.
          This only adds a grammar class, which will be used by the test.

          Show
          Kristian Waagan added a comment - Committed 'derby-2031-1a-grammar_enum.diff' to trunk with revision 669810. This only adds a grammar class, which will be used by the test.
          Hide
          Kristian Waagan added a comment -

          'derby-2031-2a-test.diff' is the first attempt of a conversion.

          To run it under a security manager, the following permissions must be granted (or just grant all for testing purposes):
          //grant codeBase "$

          {derbyTesting.ppcodeclasses}

          " { // Commented out, not yet in trunk
          grant {

          // Allow connection to a server.
          permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
          permission java.net.SocketPermission "localhost", "connect,resolve";
          permission java.net.SocketPermission "$

          {derbyTesting.serverhost}

          ", "connect,resolve";

          // Import/export and other support files from these locations in tests
          permission java.io.FilePermission "$

          {user.dir}

          $

          {/}extin${/}

          -", "read";
          };

          This patch will add 150 tests to the package-private test suite (followup patch), base on the current 'protocol.tests' file.
          Patch ready for review.

          Show
          Kristian Waagan added a comment - 'derby-2031-2a-test.diff' is the first attempt of a conversion. To run it under a security manager, the following permissions must be granted (or just grant all for testing purposes): //grant codeBase "$ {derbyTesting.ppcodeclasses} " { // Commented out, not yet in trunk grant { // Allow connection to a server. permission java.net.SocketPermission "127.0.0.1", "connect,resolve"; permission java.net.SocketPermission "localhost", "connect,resolve"; permission java.net.SocketPermission "$ {derbyTesting.serverhost} ", "connect,resolve"; // Import/export and other support files from these locations in tests permission java.io.FilePermission "$ {user.dir} $ {/}extin${/} -", "read"; }; This patch will add 150 tests to the package-private test suite (followup patch), base on the current 'protocol.tests' file. Patch ready for review.
          Hide
          Kristian Waagan added a comment -

          Committed 'derby-2031-2a-test.diff' to trunk with revision 670526.
          Another patch will follow to enable the test as part of the package-private test ant target.

          Show
          Kristian Waagan added a comment - Committed 'derby-2031-2a-test.diff' to trunk with revision 670526. Another patch will follow to enable the test as part of the package-private test ant target.
          Hide
          Kristian Waagan added a comment -

          'derby-2031-3a-enable_test.diff' enables ProtocolTest as part of the package private test suite.
          To run it, execute "ant junit-pptesting" (at the moment it should run 250 tests with the patch applied).

          The only thing out of the ordinary with this patch, is that I had to do some changes to SecurityMangerSetup. I would like to know if people find the change ok.

          Patch ready for review.

          Show
          Kristian Waagan added a comment - 'derby-2031-3a-enable_test.diff' enables ProtocolTest as part of the package private test suite. To run it, execute "ant junit-pptesting" (at the moment it should run 250 tests with the patch applied). The only thing out of the ordinary with this patch, is that I had to do some changes to SecurityMangerSetup. I would like to know if people find the change ok. Patch ready for review.
          Hide
          Knut Anders Hatlen added a comment -

          The changes look OK to me. Perhaps a small comment could be added in SecurityManagerTestSetup to explain when ppTesting is null and non-null. I tried the junit-pptesting target and all the tests ran successfully.

          Show
          Knut Anders Hatlen added a comment - The changes look OK to me. Perhaps a small comment could be added in SecurityManagerTestSetup to explain when ppTesting is null and non-null. I tried the junit-pptesting target and all the tests ran successfully.
          Hide
          Kristian Waagan added a comment -

          Thanks for looking at the patch Knut Anders

          Attached and committed patch 3b to trunk with revision 672770.
          Revision 3b added a comment as suggested by Knut Anders.

          I have not yet resolved this issue nor deleted the old test, because I don't believe anyone is running the package-private tests on a regular basis.
          I'm wondering what it takes to make that happen...

          Show
          Kristian Waagan added a comment - Thanks for looking at the patch Knut Anders Attached and committed patch 3b to trunk with revision 672770. Revision 3b added a comment as suggested by Knut Anders. I have not yet resolved this issue nor deleted the old test, because I don't believe anyone is running the package-private tests on a regular basis. I'm wondering what it takes to make that happen...
          Hide
          Kathey Marsden added a comment -

          Can the package-private tests be pullled into suites.All or do they have to be run separately?

          Show
          Kathey Marsden added a comment - Can the package-private tests be pullled into suites.All or do they have to be run separately?
          Hide
          Kathey Marsden added a comment -

          I played with this a little bit and see
          1) You can only run with classes and classes.pptesting. It doesn't seem to work with jars.
          2) I am getting a failure on Windows XP trying to remove a file.
          Derby DRDA protocol testsjunit.framework.AssertionFailedError: extin\connect.inc
          at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:130)
          at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35)
          at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102)
          at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98)
          at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:127)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
          at junit.extensions.TestSetup.run(TestSetup.java:23)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
          at junit.extensions.TestSetup.run(TestSetup.java:23)
          at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
          at junit.extensions.TestSetup.run(TestSetup.java:23)

          Show
          Kathey Marsden added a comment - I played with this a little bit and see 1) You can only run with classes and classes.pptesting. It doesn't seem to work with jars. 2) I am getting a failure on Windows XP trying to remove a file. Derby DRDA protocol testsjunit.framework.AssertionFailedError: extin\connect.inc at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:130) at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35) at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102) at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98) at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:127) at junit.extensions.TestSetup$1.protect(TestSetup.java:20) at junit.extensions.TestSetup.run(TestSetup.java:23) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23)
          Hide
          Kristian Waagan added a comment -

          Currently it is only possible to easily run the tests from classes.

          Technically it is possible to run from jars in at least three ways, all with some disadvantages:
          a) Use unsealed jars.
          b) Include the tests in the production jars.
          c) Run with the jars in the boot classpath.

          Note that these approaches can be used "temporarily", i.e. only to run the tests and not for the distribution jars.

          Regarding the failure, I haven't tested on Windows. Wasn't there a similar problem with another test reported not so long ago?

          Show
          Kristian Waagan added a comment - Currently it is only possible to easily run the tests from classes. Technically it is possible to run from jars in at least three ways, all with some disadvantages: a) Use unsealed jars. b) Include the tests in the production jars. c) Run with the jars in the boot classpath. Note that these approaches can be used "temporarily", i.e. only to run the tests and not for the distribution jars. Regarding the failure, I haven't tested on Windows. Wasn't there a similar problem with another test reported not so long ago?
          Hide
          Kathey Marsden added a comment - - edited

          There was a problem with the new StressMultiTest removing the database directory because of DERBY-3789. Erlend was able to workaround that problem by making sure all the result sets were closed. In this case it was not the database directory I think, but rather the test include file connect.inc. There must be a problem with the protocol test that it leaves a file handle open to the include file.

          Show
          Kathey Marsden added a comment - - edited There was a problem with the new StressMultiTest removing the database directory because of DERBY-3789 . Erlend was able to workaround that problem by making sure all the result sets were closed. In this case it was not the database directory I think, but rather the test include file connect.inc. There must be a problem with the protocol test that it leaves a file handle open to the include file.
          Hide
          Kristian Waagan added a comment -

          'derby-2031-4a-close_streams.diff' closes the opened readers/inputstreams.
          I haven't tested the patch on Windows, but hopefully it fixes the failure seen there.

          Show
          Kristian Waagan added a comment - 'derby-2031-4a-close_streams.diff' closes the opened readers/inputstreams. I haven't tested the patch on Windows, but hopefully it fixes the failure seen there.
          Hide
          Kristian Waagan added a comment -

          Committed patch 4a to trunk with revision 681302.
          I verified the fix with Cygwin on Windows XP; the test failed without the patch and succeeded after it was applied.

          Thanks for brining up the issue, Kathey.

          Show
          Kristian Waagan added a comment - Committed patch 4a to trunk with revision 681302. I verified the fix with Cygwin on Windows XP; the test failed without the patch and succeeded after it was applied. Thanks for brining up the issue, Kathey.
          Hide
          Myrna van Lunteren added a comment -

          I'd like to close this one as fixed in 10.5. Objections?

          Show
          Myrna van Lunteren added a comment - I'd like to close this one as fixed in 10.5. Objections?
          Hide
          Kristian Waagan added a comment -

          I think we are still running two versions of the test; one with an adapter in the drda package (to avoid making a set of methods public), and the new JUnit test.
          The reason why the latter hasn't replaced the old test, is the packaging problem. Due to this, the test is only run when running against classes, and it isn't run as part of suites.All.
          Changes done to the protocol test file will affect both versions of the test.

          One way forward could be to write a smaller adapter and have the new JUnit test use it to be able to run the test against the JARs (I haven't investigated this approach).

          Show
          Kristian Waagan added a comment - I think we are still running two versions of the test; one with an adapter in the drda package (to avoid making a set of methods public), and the new JUnit test. The reason why the latter hasn't replaced the old test, is the packaging problem. Due to this, the test is only run when running against classes, and it isn't run as part of suites.All. Changes done to the protocol test file will affect both versions of the test. One way forward could be to write a smaller adapter and have the new JUnit test use it to be able to run the test against the JARs (I haven't investigated this approach).
          Hide
          Kristian Waagan added a comment -

          This issue is starting to annoy me...
          Since we already have one adapter, would it be okay to rewrite the JUnit test to use it, and potentially rewrite the adapter itself to make it smaller?
          Obviously we won't get rid of the adapter, which will make available some methods that shouldn't be public, but we can then finally ditch the old version of the test.

          Opinions?

          Show
          Kristian Waagan added a comment - This issue is starting to annoy me... Since we already have one adapter, would it be okay to rewrite the JUnit test to use it, and potentially rewrite the adapter itself to make it smaller? Obviously we won't get rid of the adapter, which will make available some methods that shouldn't be public, but we can then finally ditch the old version of the test. Opinions?
          Hide
          Kristian Waagan added a comment -

          And of course, the main point about dropping the old test and making the new test run against the jar files is that we can include it in suites.All such that it is run "all the time".

          Show
          Kristian Waagan added a comment - And of course, the main point about dropping the old test and making the new test run against the jar files is that we can include it in suites.All such that it is run "all the time".
          Hide
          Kristian Waagan added a comment -

          Attaching a partial patch showing what this would look like with an adapter in the production jars.
          How to evaluate:
          Take a look at the class ProtocolTestAdapter and consider if you're comfortable distributing this code with the production derbynet.jar file. Remember to take into account the files that are removed from the same jar (TestFile and TestProto) too.

          The patch isn't complete, there's still some cleanup to do in the code running the tests (i.e. the test will no longer be run with junit-pptesting). Note also that the test code used Java 5 features, but I'm under the impression this test can't run with J2ME anyway?

          Show
          Kristian Waagan added a comment - Attaching a partial patch showing what this would look like with an adapter in the production jars. How to evaluate: Take a look at the class ProtocolTestAdapter and consider if you're comfortable distributing this code with the production derbynet.jar file. Remember to take into account the files that are removed from the same jar (TestFile and TestProto) too. The patch isn't complete, there's still some cleanup to do in the code running the tests (i.e. the test will no longer be run with junit-pptesting). Note also that the test code used Java 5 features, but I'm under the impression this test can't run with J2ME anyway?
          Hide
          Kristian Waagan added a comment -

          Attaching patch 5a, which adds a new adapter, moves (or more correctly copies) the test to the derbynet package, and adds it to the derbynet suite.

          Follow-up patches will delete the old harness test and the package-private test.
          The patch is dependent on DERBY-5631, so it'll have to sit around for a little while.

          To apply you need to do some svn stuff:
          svn cp java/testing/org/apache/derby/impl/drda/ProtcolTest.java java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.java && cp /dev/null java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.java
          svn cp java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.policy && cp /dev/null java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.policy

          I intend to commit this as soon as DERBY-5631 is in.
          Patch ready for review.

          Show
          Kristian Waagan added a comment - Attaching patch 5a, which adds a new adapter, moves (or more correctly copies) the test to the derbynet package, and adds it to the derbynet suite. Follow-up patches will delete the old harness test and the package-private test. The patch is dependent on DERBY-5631 , so it'll have to sit around for a little while. To apply you need to do some svn stuff: svn cp java/testing/org/apache/derby/impl/drda/ProtcolTest.java java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.java && cp /dev/null java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.java svn cp java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.policy && cp /dev/null java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ProtocolTest.policy I intend to commit this as soon as DERBY-5631 is in. Patch ready for review.
          Hide
          Dag H. Wanvik added a comment -

          Looked briefly at the new test. Typo: "adatper". Btw, shouldn't the TestProtocolAdapter#close method be called somewhere in the test lest the socket remain open? Maybe in a finally block in testProtocolSequence? (not a full review yet)

          Show
          Dag H. Wanvik added a comment - Looked briefly at the new test. Typo: "adatper". Btw, shouldn't the TestProtocolAdapter#close method be called somewhere in the test lest the socket remain open? Maybe in a finally block in testProtocolSequence? (not a full review yet)
          Hide
          Dag H. Wanvik added a comment -

          Also: TestProtocolAdapter#getCodePointValueTable isnt't used. Could it be removed?

          Show
          Dag H. Wanvik added a comment - Also: TestProtocolAdapter#getCodePointValueTable isnt't used. Could it be removed?
          Hide
          Kristian Waagan added a comment -

          Thanks for the comments, Dag.
          I've addressed the issues (fixed type in variable name, calling close, removed unused method), and also added a little more comments, fixed some typos / whitespace / formatting issues, added an assert for the shutdown exception, and renamed and made cpNames static.

          In case it's unclear, this is a svn copy followed by a bunch of modifications. I plan to delete the two old tests running when we see that the new test runs without issues.

          ProtocolTest is now added to suites.All as part of derbynet._Suite. It contains 155 test cases and the whole test runs in less than 10 seconds on my system.

          Committed patch 5b to trunk with revision 1297517.

          Show
          Kristian Waagan added a comment - Thanks for the comments, Dag. I've addressed the issues (fixed type in variable name, calling close, removed unused method), and also added a little more comments, fixed some typos / whitespace / formatting issues, added an assert for the shutdown exception, and renamed and made cpNames static. In case it's unclear, this is a svn copy followed by a bunch of modifications. I plan to delete the two old tests running when we see that the new test runs without issues. ProtocolTest is now added to suites.All as part of derbynet._Suite. It contains 155 test cases and the whole test runs in less than 10 seconds on my system. Committed patch 5b to trunk with revision 1297517.
          Hide
          Kristian Waagan added a comment -

          Disabled test with revision 1297524 while investigating a permission issue.

          Show
          Kristian Waagan added a comment - Disabled test with revision 1297524 while investigating a permission issue.
          Hide
          Kristian Waagan added a comment -

          Re-enabled the test with revision 1298789 (backed out revision 1297524).

          Show
          Kristian Waagan added a comment - Re-enabled the test with revision 1298789 (backed out revision 1297524).
          Hide
          Kristian Waagan added a comment -

          The new test seems to be running without failures. I'll soon remove the old style harness version of the test and the assoicated support files.

          Attaching patch 6a, which removes the package-private version of the test.
          The number of tests in 'ant junit-pptesting' went down from 222 to 67 after removing ProtocolTest. This fits nicely, as that test has 155 test cases.

          Committed patch 6a to trunk with revision 1300285.

          Show
          Kristian Waagan added a comment - The new test seems to be running without failures. I'll soon remove the old style harness version of the test and the assoicated support files. Attaching patch 6a, which removes the package-private version of the test. The number of tests in 'ant junit-pptesting' went down from 222 to 67 after removing ProtocolTest. This fits nicely, as that test has 155 test cases. Committed patch 6a to trunk with revision 1300285.
          Hide
          Kristian Waagan added a comment -

          Attaching patch 7a, which removes the old harness test.
          See the stat-file, several files are being removed by this change.
          I ran suites.All and derbyall without errors.

          I plan to commit this shortly.

          Show
          Kristian Waagan added a comment - Attaching patch 7a, which removes the old harness test. See the stat-file, several files are being removed by this change. I ran suites.All and derbyall without errors. I plan to commit this shortly.
          Hide
          Kristian Waagan added a comment -

          Committed patch 7a, including the deletions, to trunk with revision 1327050.
          I fixed a few lines in the patch where I had used a mix of tabs and spaces for indentation.

          This finally concludes the work for this JIRA - there is now only one version of the test, and it is being run as part of suites.All.

          Show
          Kristian Waagan added a comment - Committed patch 7a, including the deletions, to trunk with revision 1327050. I fixed a few lines in the patch where I had used a mix of tabs and spaces for indentation. This finally concludes the work for this JIRA - there is now only one version of the test, and it is being run as part of suites.All.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development