// Cli Requests
clientA.copyFile("file-1", "file-1.bak");
// CLI request while running.
StatusFolderRequest statusRequest = new StatusFolderRequest();
StatusOperationOptions statusOperationOption = new StatusOperationOptions();
statusOperationOption.setForceChecksum(true);
statusRequest.setId(30);
statusRequest.setRoot(clientA.getConfig().getLocalDir().getAbsolutePath());
statusRequest.setOptions(statusOperationOption);
// Create big file to trigger sync
clientA.createNewFile("bigfileforlongsync", 5000);
// ^^ Now sync should start and we send 'status' requests
boolean syncRunningMessageReceived = false;
for (i = 30; i < 50; i++) {
statusRequest.setId(i);
eventBus.post(statusRequest);
response = waitForResponse(i);
if (response instanceof AlreadySyncingResponse) {
syncRunningMessageReceived = true;
break;
}
Thread.sleep(200);
}
assertTrue(syncRunningMessageReceived);
// Allow daemon to sync
Thread.sleep(10000);
for (i = 50; i < 60; i++) {
statusRequest.setId(i);
eventBus.post(statusRequest);
response = waitForResponse(i);
if (response instanceof StatusFolderResponse) {