Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1524

use more standard junit annotation "@Before" in SaslXTests rather than static blocks

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tests
    • Labels:
      None

      Description

      The following tests:

      AuthTest.java
      SaslAuthFailTest.java
      SaslAuthDesignatedClientTest.java
      SaslAuthFailDesignatedClientTest.java
      SaslAuthMissingClientConfigTest.java
      SaslAuthTest.java

      use "static

      {..}

      " blocks to initialize system properties and files prior to the test runs. As Patrick points out in ZOOKEEPER-1503, we should instead use JUnit's @Before annotation:

      http://junit.sourceforge.net/javadoc/org/junit/Before.html

      rather than static blocks, to make our tests more consistent and easier to understand.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ekoontz Eugene Joseph Koontz
                Reporter:
                ekoontz Eugene Joseph Koontz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: