Package org.syncany.operations.down

Examples of org.syncany.operations.down.DownOperationResult


    File hSEDatabaseFileHidden = new File(hSEDatabaseFile.getParentFile(), "HIDE_THIS_FILE_" + hSEDatabaseFile.getName());

    hSEDatabaseFile.renameTo(hSEDatabaseFileHidden);

    // 3. This shouldn't do anything; no new databases!
    DownOperationResult downOperationResult = clientIH.down();
    assertEquals(0, downOperationResult.getDownloadedUnknownDatabases().size());

    // 4. Upload database from client "MOM" (later considered DIRTY)
    clientMOM.createNewFile("fileMOM-1.jpg");
    clientMOM.changeFile("file1.jpg");
    clientMOM.up(upOptionsWithForce);

    clientMOM.createNewFile("fileMOM-2.jpg");
    clientMOM.up(upOptionsWithForce);

    // 5. Download changes from "MOM" (apply databases and files that will later be DIRTY)
    downOperationResult = clientIH.down();
    assertEquals(0, downOperationResult.getDirtyDatabasesCreated().size());

    // 6. Rename hidden database (= the later winner!)Now download the changes that
    //    Databases of client "MOM" will be considered "DIRTY"
    hSEDatabaseFileHidden.renameTo(hSEDatabaseFile);

    downOperationResult = clientIH.down();
    assertEquals(2, downOperationResult.getDirtyDatabasesCreated().size());

    // 7. This should remove DIRTY database versions from the database
    //    and ADD the multichunks from the previous database versions to the new database version (<< this is what kills MOM)
    clientIH.up();
View Full Code Here


    File hSEDatabaseFileHidden = new File(hSEDatabaseFile.getParentFile(), "HIDE_THIS_FILE_" + hSEDatabaseFile.getName());

    hSEDatabaseFile.renameTo(hSEDatabaseFileHidden);

    // 3. This shouldn't do anything; no new databases!
    DownOperationResult downOperationResult = clientIH.down();
    assertEquals(0, downOperationResult.getDownloadedUnknownDatabases().size());

    clientIHtwo.down(); // same as IH!

    // 4. Upload database from client "MOM" (later considered DIRTY)
    clientMOM.createNewFile("fileMOM-1.jpg");
    clientMOM.changeFile("file1.jpg");
    clientMOM.up(upOptionsWithForce);

    clientMOM.createNewFile("fileMOM-2.jpg");
    clientMOM.up(upOptionsWithForce);

    // 5. Download changes from "MOM" (apply databases and files that will later be DIRTY)
    downOperationResult = clientIH.down();
    assertEquals(0, downOperationResult.getDirtyDatabasesCreated().size());

    clientIHtwo.down(); // same as IH!

    // 6. Rename hidden database (= the later winner!)Now download the changes that
    //    Databases of client "MOM" will be considered "DIRTY"
    hSEDatabaseFileHidden.renameTo(hSEDatabaseFile);

    downOperationResult = clientIH.down();
    assertEquals(2, downOperationResult.getDirtyDatabasesCreated().size());

    clientIHtwo.down(); // same as IH!

    // 7. This should remove DIRTY database versions from the database
    //    and ADD the multichunks from the previous database versions to the new database version (<< this is what kills MOM)
View Full Code Here

TOP

Related Classes of org.syncany.operations.down.DownOperationResult

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.