tison created ZOOKEEPER-3557:
--------------------------------

             Summary: Towards a testable codebase
                 Key: ZOOKEEPER-3557
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3557
             Project: ZooKeeper
          Issue Type: Task
          Components: tests
            Reporter: tison


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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to