ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-724

Improve junit test integration - log harness information

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: tests
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently we have ad-hoc logging (log4j) of setup/teardown and test start/end. Without this information it's often difficult to determine
      what's going on (major milestones) in the logs relative to the tests performed.

      In junit 4.x "@Rule" annotations have been added that allow this to be done much more easily. This patch will add this.

      In particular we can access the test name easily during setup/teardown and the test itself. Additionally we can log more information on
      success/failure of each test.

        Issue Links

          Activity

          Hide
          Patrick Hunt added a comment -

          this patch cleans up the tests by:

          1) moving everything over to junit4 fully (annotations)
          2) added a test runner subclass that all the tests use - this runner logs (log4j) before/after running a test method
          3) adds a test watchman (@rule) that logs before/after a test is run, also logs test result - success/failure, and in the case of failure the exception that caused the failure

          basically this allows us to much more easily track when tests start/end and setup/teardown runs.

          Show
          Patrick Hunt added a comment - this patch cleans up the tests by: 1) moving everything over to junit4 fully (annotations) 2) added a test runner subclass that all the tests use - this runner logs (log4j) before/after running a test method 3) adds a test watchman (@rule) that logs before/after a test is run, also logs test result - success/failure, and in the case of failure the exception that caused the failure basically this allows us to much more easily track when tests start/end and setup/teardown runs.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12439635/ZOOKEEPER-724.patch
          against trunk revision 925362.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 217 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12439635/ZOOKEEPER-724.patch against trunk revision 925362. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 217 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/38/console This message is automatically generated.
          Hide
          Mahadev konar added a comment -

          +1 the patch looks good...

          Show
          Mahadev konar added a comment - +1 the patch looks good...
          Hide
          Mahadev konar added a comment -

          I just committed this. thanks pat!

          Show
          Mahadev konar added a comment - I just committed this. thanks pat!
          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #777 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/777/)

          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #777 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/777/ )

            People

            • Assignee:
              Patrick Hunt
              Reporter:
              Patrick Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development