Package org.apache.niolex.zookeeper.watcher

Examples of org.apache.niolex.zookeeper.watcher.WatcherHolder


    @Order(2)
    @Test
    public void testReconnect() throws Exception {
        Field watcherHolderF = FieldUtil.getField(ZKConnector.class, "watcherHolder");
        WatcherHolder watcherOld = FieldUtil.getFieldValue(ZKC, watcherHolderF);
        WatcherHolder watcher = mock(WatcherHolder.class);
        doThrow(new RuntimeException("Lex-xeL")).when(watcher).reconnected();
        FieldUtil.setFieldValue(ZKC, watcherHolderF, watcher);
        FieldUtil.setFieldValue(ZKC, FieldUtil.getField(ZKConnector.class, "sessionTimeout"), 3);
        Thread t = Runner.run(ZKC, "reconnect");
        ThreadUtil.sleep(20);
View Full Code Here

TOP

Related Classes of org.apache.niolex.zookeeper.watcher.WatcherHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.