Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.6.1.0
    • Component/s: Test
    • Labels:
      None
    • Issue & fix info:
      Newcomer

      Description

      Conversion of the dropTable test into JUnit

      1. helpers.diff
        7 kB
        Knut Anders Hatlen
      2. ASF.LICENSE.NOT.GRANTED--DropTableTest.diff
        44 kB
        Eranda Sooriyabandara
      3. ASF.LICENSE.NOT.GRANTED--DropTableTest.diff
        39 kB
        Eranda Sooriyabandara

        Activity

        Hide
        Eranda Sooriyabandara added a comment -

        Hi,
        Here I am attaching the patch(not the final patch) of debugged version of
        the DropTableTest test.
        I am hoping to break the test into several methods.

        Show
        Eranda Sooriyabandara added a comment - Hi, Here I am attaching the patch(not the final patch) of debugged version of the DropTableTest test. I am hoping to break the test into several methods.
        Hide
        Bryan Pendleton added a comment -

        Hi Eranda, It's nice to see you back working with Derby!

        It looks like you are making great progress. I agree that the test would benefit
        from being subdivided into smaller methods.

        Also, don't forget to add the test to _Suite.java so that it will be run as
        part of the overall derbylang JUnit suite.

        Show
        Bryan Pendleton added a comment - Hi Eranda, It's nice to see you back working with Derby! It looks like you are making great progress. I agree that the test would benefit from being subdivided into smaller methods. Also, don't forget to add the test to _Suite.java so that it will be run as part of the overall derbylang JUnit suite.
        Hide
        Eranda Sooriyabandara added a comment -

        Hi Bryan,
        Thanks for looking at the test and make me correct.

        In this patch I break the test into several methods,
        testWithConstraints()
        testWithTriggers()
        testWithPreparedStatement()
        testWithView()
        testDropView()
        testIndexesDropped()

        Also I compared it with the DropTable.out file for any missing tests. I
        found that there are some repeated tests and I removed them. I think now the
        test can be committed as a patch. Please let me know your view about this.

        Show
        Eranda Sooriyabandara added a comment - Hi Bryan, Thanks for looking at the test and make me correct. In this patch I break the test into several methods, testWithConstraints() testWithTriggers() testWithPreparedStatement() testWithView() testDropView() testIndexesDropped() Also I compared it with the DropTable.out file for any missing tests. I found that there are some repeated tests and I removed them. I think now the test can be committed as a patch. Please let me know your view about this.
        Hide
        Bryan Pendleton added a comment -

        Hi Eranda, thanks for working on this test.

        I don't see the latest attachment, only the 24-Oct attachment.

        Can you check and re-attach your latest patch?

        Show
        Bryan Pendleton added a comment - Hi Eranda, thanks for working on this test. I don't see the latest attachment, only the 24-Oct attachment. Can you check and re-attach your latest patch?
        Hide
        Eranda Sooriyabandara added a comment -

        Hi Bryan,
        Here is the final patch.

        Show
        Eranda Sooriyabandara added a comment - Hi Bryan, Here is the final patch.
        Hide
        Bryan Pendleton added a comment -

        Thanks Eranda, this looks great! I'll look into committing this soon.

        Show
        Bryan Pendleton added a comment - Thanks Eranda, this looks great! I'll look into committing this soon.
        Hide
        Bryan Pendleton added a comment -

        The new test runs successfully for me, so I committed it to the subversion
        trunk as revision 833055.

        Thanks for contributing the test, Eranda; it is clear and easy to read.

        Show
        Bryan Pendleton added a comment - The new test runs successfully for me, so I committed it to the subversion trunk as revision 833055. Thanks for contributing the test, Eranda; it is clear and easy to read.
        Hide
        Eranda Sooriyabandara added a comment -

        Hi Bryan,
        Thanks for committing the test.
        I am closing this issue.

        Show
        Eranda Sooriyabandara added a comment - Hi Bryan, Thanks for committing the test. I am closing this issue.
        Hide
        Knut Anders Hatlen added a comment -

        I took the liberty of simplifying the new test slightly (see attached
        patch helpers.diff):

        • use more helper methods from BaseJDBCTestCase
        • changed instance variables into local variables to allow garbage
          collection to reclaim space when the test has completed

        Committed revision 835114.

        Show
        Knut Anders Hatlen added a comment - I took the liberty of simplifying the new test slightly (see attached patch helpers.diff): use more helper methods from BaseJDBCTestCase changed instance variables into local variables to allow garbage collection to reclaim space when the test has completed Committed revision 835114.

          People

          • Assignee:
            Eranda Sooriyabandara
            Reporter:
            Eranda Sooriyabandara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development