Package org.syncany.tests.util

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


    clientA.createNewFile("A4,C4");
    clientA.up();
    clientA.createNewFile("A5,C4");
    clientA.up();

    clientC.createNewFile("A3,C5");
    clientC.up();
    clientC.createNewFile("A3,C6");
    clientC.up();
    clientC.createNewFile("A3,C7");
    clientC.up();
View Full Code Here


    // A moves, and up
    clientA.moveFile("A-original", "A-moved");
    clientA.up();
   
    // B creates file at same location
    clientB.createNewFile("A-moved"); // << same as above
    clientB.down();
    assertConflictingFileExists("A-moved", clientB.getLocalFilesExcludeLockedAndNoRead());

    // Sync them
    clientB.sync();   
View Full Code Here

    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();   
    TestClient clientA = new TestClient("A", testConnection);
    java.sql.Connection databaseConnectionA = DatabaseConnectionFactory.createConnection(clientA.getDatabaseFile());
       
    // A new/up
    clientA.createNewFile("A-original");   
    clientA.upWithForceChecksum();
   
    String originalFileHistoryStr = TestSqlUtil.runSqlSelect("select filehistory_id from fileversion", databaseConnectionA);
    assertNotNull(originalFileHistoryStr);
   
View Full Code Here

    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();   
    TestClient clientA = new TestClient("A", testConnection);
    java.sql.Connection databaseConnectionA = DatabaseConnectionFactory.createConnection(clientA.getDatabaseFile());
       
    // A new/up
    clientA.createNewFile("A-original");   
    clientA.upWithForceChecksum();
   
    String originalFileHistoryStr = TestSqlUtil.runSqlSelect("select filehistory_id from fileversion", databaseConnectionA);
    assertNotNull(originalFileHistoryStr);
   
View Full Code Here

    TestClient clientA = new TestClient("A", testConnection);
    java.sql.Connection databaseConnectionA = DatabaseConnectionFactory.createConnection(clientA.getDatabaseFile());
       
    // A new/up
    clientA.createNewFolder("folder/subfolder");
    clientA.createNewFile("folder/subfolder/A-original");   
    clientA.upWithForceChecksum();
   
    String originalFileHistoryStr = TestSqlUtil.runSqlSelect("select filehistory_id from fileversion where path='folder/subfolder/A-original'", databaseConnectionA);
    assertNotNull(originalFileHistoryStr);
   
View Full Code Here

   
    clientB.down();   
    clientB.createNewFile("file2.jpg");
    clientB.upWithForceChecksum();
   
    clientC.createNewFile("file3.jpg"); // Client C: No down!
    clientC.up(cUpOptionsWithForce);   
   
    // A tries to upload, this fails due to C's unknown database
    clientA.createNewFile("file4.jpg");
    UpOperationResult aUpResult = clientA.upWithForceChecksum(); //
View Full Code Here

    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!"
View Full Code Here

    // Run
    clientA.createNewFile("file1.jpg");
    clientA.up();
   
    clientB.down();   
    clientB.createNewFile("file2.jpg");
    clientB.up();
   
    clientA.createNewFile("file3.jpg");
    clientA.up(upOptionsWithForce);    // No 'down' (creates dirty version) 
   
View Full Code Here

    // Round 1
    clientA.createNewFile("file1.jpg");
    clientA.up();
   
    clientB.down();   
    clientB.createNewFile("file2.jpg");
    clientB.up();
   
    clientA.createNewFile("file3.jpg");
    clientA.up(upOptionsWithForce);    // No 'down' (creates dirty version) 
   
View Full Code Here

    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
    TestClient clientA = new TestClient("A", testConnection);

    // Run!
    clientA.createNewFile("locked-file");
    RandomAccessFile lockedFile = new RandomAccessFile(clientA.getLocalFile("locked-file"), "rw");
    FileLock lockedFileLock = lockedFile.getChannel().lock();

    runUpAndTestForEmptyDatabase(testConnection, clientA);
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.