Package org.syncany.tests.util

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


    options.setMinSecondsBetweenCleanups(40000000);

    // Run

    // A: Create some file versions
    clientA.createNewFile("file.jpg");
    for (int i = 1; i <= 16; i++) {
      clientA.changeFile("file.jpg");
      clientA.upWithForceChecksum();
    }
View Full Code Here


    File repoTransactionsDir = new File(testConnection.getPath() + "/transactions");
    File repoTemporaryDir = new File(testConnection.getPath() + "/temporary");

    // Run

    clientA.createNewFile("A-file1", 5 * 1024);
    clientA.up();

    for (int i = 0; i < 5; i++) {
      clientA.changeFile("A-file1");
      clientA.upWithForceChecksum();
View Full Code Here

    LocalTransferSettings testConnection = (LocalTransferSettings) TestConfigUtil.createTestLocalConnection();   
    TestClient clientA = new TestClient("A", testConnection);
   
    // ROUND 1: many sync up (no cleanup expected here)   
    for (int i=1; i<=15; i++) {
      clientA.createNewFile("file"+i, 1);
      clientA.up();   
    }
   
    for (int i=1; i<=15; i++) {
      DatabaseRemoteFile expectedDatabaseRemoteFile = new DatabaseRemoteFile("A", i);
View Full Code Here

     
      assertTrue("Database file SHOULD exist: "+expectedDatabaseFile, expectedDatabaseFile.exists());
    }

    // ROUND 2: 1x sync up (cleanup expected!)
    clientA.createNewFile("file16", 1);
    clientA.up();   
   
    clientA.cleanup(); // Force cleanup

    for (int i=1; i<=15; i++) {
View Full Code Here

      assertTrue("Database file SHOULD exist: "+expectedDatabaseFile, expectedDatabaseFile.exists());
    }
   
    // ROUND 3: many sync up (no cleanup expected here)   
    for (int i=17; i<=30; i++) {
      clientA.createNewFile("file"+i, 1);
      clientA.up();   
    }
   
    for (int i=1; i<=15; i++) {
      DatabaseRemoteFile expectedDatabaseRemoteFile = new DatabaseRemoteFile("A", i);
View Full Code Here

     
      assertTrue("Database file SHOULD exist: "+expectedDatabaseFile, expectedDatabaseFile.exists());
    }   
   
    // ROUND 4: 1x sync up (cleanup expected!)
    clientA.createNewFile("file31", 1);
    clientA.up();   
   
    CleanupOperationOptions options = new CleanupOperationOptions();
   
    options.setForce(true);
View Full Code Here

    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);
    TestClient clientC = new TestClient("C", testConnection);
   
    // Run
    clientC.createNewFile("C1");
    clientC.up();
    clientC.createNewFile("C2");
    clientC.up();
    clientC.createNewFile("C3");
    clientC.up();
View Full Code Here

    TestClient clientC = new TestClient("C", testConnection);
   
    // Run
    clientC.createNewFile("C1");
    clientC.up();
    clientC.createNewFile("C2");
    clientC.up();
    clientC.createNewFile("C3");
    clientC.up();
   
    clientB.down(); // NO CONFLICT
View Full Code Here

    // Run
    clientC.createNewFile("C1");
    clientC.up();
    clientC.createNewFile("C2");
    clientC.up();
    clientC.createNewFile("C3");
    clientC.up();
   
    clientB.down(); // NO CONFLICT
    assertFileListEquals("Client B and C should be on the same versions.", clientB.getLocalFilesExcludeLockedAndNoRead(), clientC.getLocalFilesExcludeLockedAndNoRead());   
View Full Code Here

    clientC.up();
   
    clientB.down(); // NO CONFLICT
    assertFileListEquals("Client B and C should be on the same versions.", clientB.getLocalFilesExcludeLockedAndNoRead(), clientC.getLocalFilesExcludeLockedAndNoRead());   

    clientC.createNewFile("C4"); // up without down! Evil!
    clientC.up();
   
    clientA.down(); // NO CONFLICT
    assertFileListEquals("Client A and C should be on the same versions.", clientA.getLocalFilesExcludeLockedAndNoRead(), clientC.getLocalFilesExcludeLockedAndNoRead());
    assertEquals("Client A should have C4, client B should not", clientA.getLocalFilesExcludeLockedAndNoRead().size()-1, clientB.getLocalFilesExcludeLockedAndNoRead().size());
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.