Derby
  1. Derby
  2. DERBY-2399

Convert setTransactionIsolation.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.3.1.4
    • Component/s: Test
    • Labels:
      None

      Description

      Convert setTransactionIsolation.java to junit

      1. derbynet.diff
        2 kB
        Knut Anders Hatlen
      2. derbynet.stat
        0.2 kB
        Knut Anders Hatlen
      There are no Sub-Tasks for this issue.

        Activity

        Hide
        Kathey Marsden added a comment -

        Looking at the master file difference between embedded and client masters, the difference is that with client setTransactionIsolation(Connection conn) commits but it does not commit with embedded. Should client be changed to match the embedded behaviour? The javadoc says.
        Note: If this method is called during a transaction, the result is implementation-defined.

        Show
        Kathey Marsden added a comment - Looking at the master file difference between embedded and client masters, the difference is that with client setTransactionIsolation(Connection conn) commits but it does not commit with embedded. Should client be changed to match the embedded behaviour? The javadoc says. Note: If this method is called during a transaction, the result is implementation-defined.
        Hide
        Andrew McIntyre added a comment -

        This difference is filed as DERBY-2064. Also related to DERBY-638.

        Show
        Andrew McIntyre added a comment - This difference is filed as DERBY-2064 . Also related to DERBY-638 .
        Hide
        Bernt M. Johnsen added a comment -

        Dan commented DERBY-2060 with:
        > Daniel John Debrunner [28/Nov/06 11:24 AM]
        > Connection.setTransactionIsolation() does commit the transaction
        > with the embedded driver unless the isolation is being changed to
        > the current isolation, ie. no change.

        Show
        Bernt M. Johnsen added a comment - Dan commented DERBY-2060 with: > Daniel John Debrunner [28/Nov/06 11:24 AM] > Connection.setTransactionIsolation() does commit the transaction > with the embedded driver unless the isolation is being changed to > the current isolation, ie. no change.
        Hide
        Knut Anders Hatlen added a comment -

        setTransactionIsolation has been failing under DerbyNet in the Tinderbox test after the changes made in this issue. The attached patch (derbynet.diff) fixes it. Before it can be applied, DerbyNet/setTransactionIsolation.out must be restored with this command:

        svn merge -r 514877:514876 https://svn.apache.org/repos/asf/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet

        Show
        Knut Anders Hatlen added a comment - setTransactionIsolation has been failing under DerbyNet in the Tinderbox test after the changes made in this issue. The attached patch (derbynet.diff) fixes it. Before it can be applied, DerbyNet/setTransactionIsolation.out must be restored with this command: svn merge -r 514877:514876 https://svn.apache.org/repos/asf/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet
        Hide
        Knut Anders Hatlen added a comment -

        Committed derbynet.diff with revision 515508.

        Show
        Knut Anders Hatlen added a comment - Committed derbynet.diff with revision 515508.
        Hide
        Kathey Marsden added a comment -

        I plan to handle the issue of RunTimeStatistics for this test as follows.
        I will add a JDBC.getRuntimeStatistics(Statement s ) method which returns a "RuntimeStatistics" object.

        the RunTimeStatistics constructor takes a String which it parses to get the isolation level. A getTransactionIsolation() method will return the isolation.

        Later the RunTimeStatistics class can be expanded to parse and return other information as needed for other tests. Does this strategy sound ok?

        Show
        Kathey Marsden added a comment - I plan to handle the issue of RunTimeStatistics for this test as follows. I will add a JDBC.getRuntimeStatistics(Statement s ) method which returns a "RuntimeStatistics" object. the RunTimeStatistics constructor takes a String which it parses to get the isolation level. A getTransactionIsolation() method will return the isolation. Later the RunTimeStatistics class can be expanded to parse and return other information as needed for other tests. Does this strategy sound ok?
        Hide
        A B added a comment -

        > Later the RunTimeStatistics class can be expanded to parse and return other information
        > as needed for other tests. Does this strategy sound ok?

        Sounds good to me. I was loosely considering doing something like this for a new test that I'm writing for DERBY-47. In the end I just decided to do a naive string search on the result set stats string to get what I need. But the approach you mention here sounds better.

        And when/if the work that Felix Beyer did is contributed, the RunTimeStatistics class could be modified appropriately to take advantage of the new functionality.

        So yes, I like this idea

        Show
        A B added a comment - > Later the RunTimeStatistics class can be expanded to parse and return other information > as needed for other tests. Does this strategy sound ok? Sounds good to me. I was loosely considering doing something like this for a new test that I'm writing for DERBY-47 . In the end I just decided to do a naive string search on the result set stats string to get what I need. But the approach you mention here sounds better. And when/if the work that Felix Beyer did is contributed, the RunTimeStatistics class could be modified appropriately to take advantage of the new functionality. So yes, I like this idea
        Hide
        Kathey Marsden added a comment -

        checked in converted test.

        Show
        Kathey Marsden added a comment - checked in converted test.

          People

          • Assignee:
            Kathey Marsden
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development