Derby
  1. Derby
  2. DERBY-2855

Convert jdbc4/TestConnectionMethods.java to JUnit

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.4.1.3
    • Component/s: Test
    • Labels:
      None
    1. DERBY-2855v1.stat
      0.8 kB
      Ramin Moazeni
    2. DERBY-2855v1.diff
      35 kB
      Ramin Moazeni
    3. DERBY-2855v0.stat
      0.6 kB
      Ramin Moazeni
    4. DERBY-2855v0.diff
      31 kB
      Ramin Moazeni

      Issue Links

        Activity

        Hide
        Ramin Moazeni added a comment -

        Hello

        I am attaching an interim patch with this issue.
        I appreciate your comments/review.

        Thanks
        Ramin Moazeni

        Show
        Ramin Moazeni added a comment - Hello I am attaching an interim patch with this issue. I appreciate your comments/review. Thanks Ramin Moazeni
        Hide
        Kathey Marsden added a comment -

        Ramin, could you explain why this is an interim patch. What else needs to be added for commit?

        Show
        Kathey Marsden added a comment - Ramin, could you explain why this is an interim patch. What else needs to be added for commit?
        Hide
        Ramin Moazeni added a comment -

        Hi Kathey

        I don't think anything needs to be added. I was not sure if
        assertStartNetworkServerOK() is implemented correctly.

        Thanks
        Ramin

        Show
        Ramin Moazeni added a comment - Hi Kathey I don't think anything needs to be added. I was not sure if assertStartNetworkServerOK() is implemented correctly. Thanks Ramin
        Hide
        Kathey Marsden added a comment -

        Hi Ramin,

        Here are some comments. Some are related to the original test, but I think are worth pursuing now.

        When I ran the test it failed with:
        junit.framework.AssertionFailedError: extin\short.txt
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.assertTrue(Assert.java:20)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:129)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:38)
        at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:104)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:101)
        at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:126)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        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.framework.TestResult.runProtected(TestResult.java:124)
        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.framework.TestResult.runProtected(TestResult.java:124)
        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.framework.TestResult.runProtected(TestResult.java:124)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

        The methods to start and stop network server are just shutting down the database and reconnecting. They should
        be starting and stopping network server using the NetworkServerControl interface. It would be good to add methods to
        TestConfiguration for startNetworkServer and stopNetworkServer

        The support file short.txt should not be under the ImportExport directory but in a directory called Clob or ConnectionMethods or something more relevant.

        The following issues are from the original test.

        Would it be possible for us to change testCreate

        {C|B}lobClient to just be testCreate{C|B}

        lob and run for both embedded and client?

        We should be checking the contents of the clob/bob that we insert.

        Show
        Kathey Marsden added a comment - Hi Ramin, Here are some comments. Some are related to the original test, but I think are worth pursuing now. When I ran the test it failed with: junit.framework.AssertionFailedError: extin\short.txt at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:129) at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:38) at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:104) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:101) at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:126) at junit.extensions.TestSetup$1.protect(TestSetup.java:20) at junit.framework.TestResult.runProtected(TestResult.java:124) 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.framework.TestResult.runProtected(TestResult.java:124) 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.framework.TestResult.runProtected(TestResult.java:124) 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.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) The methods to start and stop network server are just shutting down the database and reconnecting. They should be starting and stopping network server using the NetworkServerControl interface. It would be good to add methods to TestConfiguration for startNetworkServer and stopNetworkServer The support file short.txt should not be under the ImportExport directory but in a directory called Clob or ConnectionMethods or something more relevant. The following issues are from the original test. Would it be possible for us to change testCreate {C|B}lobClient to just be testCreate{C|B} lob and run for both embedded and client? We should be checking the contents of the clob/bob that we insert.
        Hide
        Ramin Moazeni added a comment -

        Hi Kathey

        Attachment please find the v1 patch that addresses your comments.
        I tried this on WinXP and the error messages you reported are
        resolved now.

        I appreciate your comments.

        Thanks
        Ramin

        Show
        Ramin Moazeni added a comment - Hi Kathey Attachment please find the v1 patch that addresses your comments. I tried this on WinXP and the error messages you reported are resolved now. I appreciate your comments. Thanks Ramin
        Hide
        Kristian Waagan added a comment -

        I believe this issue has been completed. Closing.

        Show
        Kristian Waagan added a comment - I believe this issue has been completed. Closing.
        Hide
        Myrna van Lunteren added a comment -

        The majority of this was committed with revision http://svn.apache.org/viewvc?view=revision&revision=574053, but I noticed the old master had been left behind. Removed with revision http://svn.apache.org/viewvc?view=revision&revision=1381429

        Show
        Myrna van Lunteren added a comment - The majority of this was committed with revision http://svn.apache.org/viewvc?view=revision&revision=574053 , but I noticed the old master had been left behind. Removed with revision http://svn.apache.org/viewvc?view=revision&revision=1381429
        Hide
        Myrna van Lunteren added a comment -

        backported the removal of the orphaned master file to 10.9 with revision 1384397 (http://svn.apache.org/viewvc?view=revision&revision=1384397), and to 10.8 with revision 1384432 (http://svn.apache.org/viewvc?view=revision&revision=1384432).

        Show
        Myrna van Lunteren added a comment - backported the removal of the orphaned master file to 10.9 with revision 1384397 ( http://svn.apache.org/viewvc?view=revision&revision=1384397 ), and to 10.8 with revision 1384432 ( http://svn.apache.org/viewvc?view=revision&revision=1384432 ).

          People

          • Assignee:
            Ramin Moazeni
            Reporter:
            Ramin Moazeni
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development