Package org.apache.zookeeper.test.system
Class SimpleSysTest
- java.lang.Object
-
- org.apache.zookeeper.test.system.BaseSysTest
-
- org.apache.zookeeper.test.system.SimpleSysTest
-
- All Implemented Interfaces:
Watcher
public class SimpleSysTest extends BaseSysTest implements Watcher
This does a basic system test. It starts up an ensemble of servers and a set of clients. It makes sure that all the clients come up. It kills off servers while making a change and then ensures that all clients see the change. And then signals the clients to die and watches them disappear.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
Watcher.Event, Watcher.WatcherType
-
-
Field Summary
-
Fields inherited from class org.apache.zookeeper.test.system.BaseSysTest
prefix
-
-
Constructor Summary
Constructors Constructor Description SimpleSysTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(WatchedEvent event)
void
testSimpleCase()
This test checks the following: 1) All clients connect successfully 2) Half of the servers die (assuming odd number) and a write succeeds 3) All servers are restarted and cluster stays alive 4) Clients see a change by the server 5) Clients' ephemeral nodes are cleaned up-
Methods inherited from class org.apache.zookeeper.test.system.BaseSysTest
configureClients, configureServers, getClientCount, getHostPort, getServerCount, main, setUp, startClient, startClients, startServer, startServers, stopClient, stopClients, stopServer, stopServers, tearDown
-
-
-
-
Method Detail
-
testSimpleCase
public void testSimpleCase() throws java.lang.Exception
This test checks the following: 1) All clients connect successfully 2) Half of the servers die (assuming odd number) and a write succeeds 3) All servers are restarted and cluster stays alive 4) Clients see a change by the server 5) Clients' ephemeral nodes are cleaned up- Throws:
java.lang.Exception
-
process
public void process(WatchedEvent event)
-
-