Examples of down()


Examples of org.syncany.tests.util.TestClient.down()

    // Create files and upload
    clientA.createNewFolder("folder");   
    clientA.createNewFile("folder/file");
    clientA.up();
   
    clientB.down();
    clientB.moveFile("folder", "moved");
    clientB.up();
     
    clientA.down();
    assertFalse("Deleted folder should not exist.", clientA.getLocalFile("folder").exists());
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

      clientA.createNewFile("A-original-" + i, 50 * 1024);

      try {
        Thread.sleep(100);
        clientA.up();
        clientA.down();
      }
      catch (StorageException e) {
        logger.log(Level.INFO, e.getMessage());
      }
    }
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    clientA.createNewFile("folder/file");
    clientA.createNewFolder("folder/folder2");
    clientA.createNewFile("folder/folder2/file2");
    clientA.up();
   
    clientB.down();
    clientB.moveFile("folder", "moved");
    clientB.up();
     
    clientA.down();
    assertFalse("Deleted folder should not exist.", clientA.getLocalFile("folder").exists());
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    clientA.up(upOptionsForceEnabled);
       
    clientB.createNewFile("A-file1.jpg", 51*1024);
    clientB.up(upOptionsForceEnabled);
   
    clientB.down(); // This creates a dirty database       
   
    // Test (for dirty database existence)
    Config configB = clientB.getConfig();
    java.sql.Connection databaseConnectionB = configB.createDatabaseConnection();

View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

   
    clientA.cleanup(cleanupOptions);
   
    clientB.down();
    clientC.down();
    clientD.down();
   
    TestAssertUtil.assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
    TestAssertUtil.assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientC.getDatabaseFile());
    TestAssertUtil.assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientD.getDatabaseFile());   
   
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    assertEquals("6", TestSqlUtil.runSqlSelect("select count(*) from databaseversion", databaseConnectionA));
   
    clientA.cleanup(cleanupOptions); // Creates PURGE database version with deleted file
    assertEquals("7", TestSqlUtil.runSqlSelect("select count(*) from databaseversion", databaseConnectionA));
       
    clientB.down(); // <<<< This creates the exception in #143
                    // integrity constraint violation: foreign key no parent; SYS_FK_10173 table: FILEVERSION
   
    // Tear down
    clientA.deleteTestData();
    clientB.deleteTestData();
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    clientA.createNewFolder("A-folder1");
    clientA.createNewFolder("A-folder2");
    clientA.createNewFolder("A-folder3");
    clientA.up();   
   
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.createNewFolder("B-folder4");
    clientB.createNewFolder("B-folder5");
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    clientA.createNewFolder("folder_without_quotes");
    clientA.createNewFile("folder_without_quotes/file");
    clientA.up();
   
    // Sync to B
    clientB.down();
   
    // Now we should move to a folder with quotes, e.g.  folder "with" quotes
    // To make this work on Windows, we first move the folder and then modify
    // the database file on the remote storage to mock it
   
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

      String databaseFileA2NewContent = databaseFileA2Content.replaceAll("folder_with_quotes", "folder &quot;with&quot; quotes");

      IOUtils.write(databaseFileA2NewContent, new FileOutputStream(databaseFile));
    }
   
    clientB.down(); // << In issue 124, this failed because we tried to move the inner "file" to the folder with quotes
   
    if (EnvironmentUtil.isWindows()) {
      assertTrue(clientB.getLocalFile("folder with quotes (filename conflict)").exists());
      assertTrue(clientB.getLocalFile("folder with quotes (filename conflict)/file").exists());
    }
View Full Code Here

Examples of org.syncany.tests.util.TestClient.down()

    // For peaking (does NOT affect the test)
    FileUtils.copyFile(new File(testConnection.getPath(), "databases/database-B-0000000001"),
        new File(testConnection.getPath(), "databases/TEMP_db-B-0000000001"));

    DownOperationResult downResultB = clientB.down(); // creates DIRTY; deletes (B1)
    assertEquals(DownResultCode.OK_WITH_REMOTE_CHANGES, downResultB.getResultCode());
    assertEquals(1, downResultB.getDirtyDatabasesCreated().size());
    assertEquals(false, downResultB.getChangeSet().hasChanges()); // TODO [low] Shouldn't this be 'true'?

    // For peaking (does NOT affect the test)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.