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

Towards a testable codebase

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • tests
    • None

    Description

      This issue is umbrella issue tracks all efforts towards a testable ZooKeeper codebase.

      Motivation

      On the one hand, many of our adopters such as HBase, Curator and so on maintain their own testkit for ZooKeeper[1][2]; on the other hand, ZooKeeper itself doesn't have a well-designed testkit. Here are some of issues in our testing "framework".

      1. ZooKeeperTestable becomes a production scope class while it should be in testing scope.
      2. ZooKeeperTestable is only used in SessionTimeoutTest while its name infers a completed testing class.
      3. ClientBase is super class of many of zookeeper tests while it contains too many orthogonal functions that its subclass inherits lots of burdens that is not required.
      4. Testing logics are injected casually so that we suffer from visibility chaos.
      ...

      Due to ZooKeeper doesn't provide testkit our adopters have to write ZK relative tests with quite internal concepts. For example, HBase wait for ZK server launched by 4 letter words which causes issue when upgrade from ZK 3.4.x to ZK 3.5.5 where 4 letter words are disabled by default.

      [1] https://github.com/apache/hbase/blob/master/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
      [2] https://github.com/apache/curator/blob/master/curator-test/src/main/java/org/apache/curator/test/TestingCluster.java

      Attachments

        Activity

          People

            Unassigned Unassigned
            tison Zili Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: