Derby
  1. Derby
  2. DERBY-5300

Change derby.tests.trace to print the class as well as fixture name

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.8.3.3, 10.9.1.0
    • Component/s: Test
    • Labels:
      None
    • Issue & fix info:
      Newcomer

      Description

      I was thinking it would be good for the test output with -Dderby.tests.trace=true to have the class name as well as the fixture as I think if I had a nickel for every time I grepped for a fixture name to find out what class it is in, I would have a pretty big piggy bank.

      It could print the full class name, like this:
      org.apache.derbyTesting.functionTests.tests.lang.SimpleTest.testBasicOperations used 844 ms .

      or strip off the org.apache.derbyTesting.functionTests for less output like:

      tests.lang.SimpleTest.testBugFixes used 6265 ms .

      Any preferences?

      1. classinfixture-stat-oct15.txt
        0.8 kB
        Jayaram Subramanian
      2. classinfixture-oct15.diff
        2 kB
        Jayaram Subramanian
      3. classinfixture-stat-oct132011.out
        0.8 kB
        Jayaram Subramanian
      4. classinfixture-Oct132011.diff
        2 kB
        Jayaram Subramanian
      5. svnstat-classinfixture.txt
        0.8 kB
        Jayaram Subramanian
      6. classinfixture_Aug182011.txt
        2 kB
        Jayaram Subramanian
      7. derby-5300-1a-print_jdbc_client.diff
        0.9 kB
        Kristian Waagan

        Activity

        Kathey Marsden created issue -
        Kristian Waagan made changes -
        Field Original Value New Value
        Attachment derby-5300-1a-print_jdbc_client.diff [ 12484417 ]
        Kristian Waagan made changes -
        Attachment derby-5090-1a-fix.diff [ 12484424 ]
        Attachment derby-5090-1a-fix.stat [ 12484425 ]
        Attachment derby-5090-2a-test.diff [ 12484426 ]
        Attachment derby-5090-2a-test.stat [ 12484427 ]
        Kristian Waagan made changes -
        Comment [ Attaching patches 1a and 2a.
        Patch 1a is the fix, including some clean-up:

        * java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
        Replace NewByteArrayInputStream with ByteArrayInputStream
        Wrap the above stream in CloseFilterInputStream

        * java/engine/org/apache/derby/iapi/services/io/CloseFilterInputStream.java
        Added filter stream that will throw exception after being closed. Modeled after the equally named class in the client.

        * java/engine/org/apache/derby/iapi/services/io/NewByteArrayInputStream.java
        Deleted this class, use a standard API-class instead.

        * java/engine/org/apache/derby/iapi/services/io/AccessibleByteArrayOutputStream.java
        Replace NewByteArrayInputStream with ByteArrayInputStream

        * java/client/org/apache/derby/client/am/ResultSet.java
        Renamed is_ to currentStream.
        Added instance variable currentReader
        Renamed method closeCloseFilterInputStream to closeOpenStreams
        Modified closeOpenStream to close both currentStream and currentReader (only one will be non-null at any time)
        Assigned reader to currentReader in getCharacterStream

        Patch 2b adds two tests, but I'm a bit unsure if I want to keep JDBCSetGet as a separate class. Will anyone else use it?
        If not, it might be better to keep them as private classes in the test class.
        If we want to add it as a JUnit utility class, should it be split in two, i.e. JDBCGet and JDBCSet? Also, if keeping I'd like to make it possible to obtain the name of the last called getter to improve the error reporting.

        Patches ready for review.
        ]
        Kristian Waagan made changes -
        Attachment derby-5090-1a-fix.diff [ 12484424 ]
        Kristian Waagan made changes -
        Attachment derby-5090-1a-fix.stat [ 12484425 ]
        Kristian Waagan made changes -
        Attachment derby-5090-2a-test.diff [ 12484426 ]
        Kristian Waagan made changes -
        Attachment derby-5090-2a-test.stat [ 12484427 ]
        Jayaram Subramanian made changes -
        Assignee Jayaram Subramanian [ rsjay1976 ]
        Jayaram Subramanian made changes -
        Attachment classinfixture_Aug182011.txt [ 12491029 ]
        Attachment svnstat-classinfixture.txt [ 12491030 ]
        Jayaram Subramanian made changes -
        Issue & fix info [Newcomer] [Newcomer, Patch Available]
        Jayaram Subramanian made changes -
        Attachment classinfixture-Oct132011.diff [ 12498875 ]
        Attachment classinfixture-stat-oct132011.out [ 12498876 ]
        Jayaram Subramanian made changes -
        Attachment classinfixture-oct15.diff [ 12499195 ]
        Attachment classinfixture-stat-oct15.txt [ 12499196 ]
        Kristian Waagan made changes -
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Issue & fix info Patch Available,Newcomer [ 10102,10423 ] Newcomer [ 10423 ]
        Jayaram Subramanian made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Kathey Marsden made changes -
        Fix Version/s 10.8.3.1 [ 12323475 ]
        Gavin made changes -
        Workflow jira [ 12618245 ] Default workflow, editable Closed status [ 12802285 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development