Package org.syncany.config

Examples of org.syncany.config.LocalEventBus


   
    // Create access token (not needed in this test, but prevents errors in daemon)
    daemonConfig.setPortTO(TestDaemonUtil.createPortTO(port));
   
    // Register to event bus     
    LocalEventBus localEventBus = LocalEventBus.getInstance();
    localEventBus.register(this);
       
    // Prepare CLI request
    StatusFolderRequest cliStatusRequest = new StatusFolderRequest();
    cliStatusRequest.setId(2586);
    cliStatusRequest.setRoot(clientA.getConfig().getLocalDir().getAbsolutePath());
   
    // Create watchServer
    WatchServer watchServer = new WatchServer()
    watchServer.start(daemonConfig);   
    Thread.sleep(1000); // Settlement for watch server
   
    // Create large file, then wait 3sec for the settlement timer and
    // send the CLI request at the same time   
    clientA.createNewFile("largefile", 10*1024*1024);
    Thread.sleep(3000); // Settlement in Watcher!
   
    localEventBus.post(cliStatusRequest);
   
    // Then, let's hope the response is "no, no, no!"
    Response response = waitForResponse(2586);
   
    assertTrue(response instanceof StatusFolderResponse);
View Full Code Here

TOP

Related Classes of org.syncany.config.LocalEventBus

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.