Package org.syncany.operations.down

Examples of org.syncany.operations.down.DatabaseBranches


    System.out.println("----------------");
   
    /// Input data ///
    String localMachineName = "B";
    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
    
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10"               
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "B/(B1,C3)/T=7"               
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(C4)/T=5"
    }));   
       
    /// Expected results ///
    TestResult expectedTestResult = new TestResult();
View Full Code Here


   
    /// Input data ///
    String localMachineName = "A";

    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10"               
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {
      "B/(B1,C3)/T=7"               
    }));
       
    /// Expected results ///
    TestResult expectedTestResult = new TestResult();
View Full Code Here

   
    /// Input data ///
    String localMachineName = "C";

    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10"               
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {     
      "B/(B1,C3)/T=7"               
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5"
    }));   
View Full Code Here

   
    /// Input data ///
    String localMachineName = "B";

    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A4,C4)/T=11",
      "A/(A5,C4)/T=12", // db-a-5
      "A/(A6,C4)/T=19", // db-a-6
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {     
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10",
      "B/(A3,B2,C4)/T=16",
      "B/(A3,B3,C4)/T=17",
      "B/(A3,B4,C4)/T=18",
      "B/(A3,B5,C4)/T=20",
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(A3,C5)/T=13", // db-c-5
      "C/(A3,C6)/T=14",
      "C/(A3,C7)/T=15", // db-c-7
      "C/(A3,C8)/T=21", // db-c-8
    }));   
View Full Code Here

   
    /// Input data ///
    String localMachineName = "A";

    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10",
      "A/(A4,C4)/T=11",
      "A/(A5,C4)/T=12",
      "A/(A6,C4)/T=19",
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {     
      "B/(A3,B2,C4)/T=16",
      "B/(A3,B3,C4)/T=17",
      "B/(A3,B4,C4)/T=18", // db-b-4
      "B/(A3,B5,C4)/T=20", // db-b-5
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(A3,C5)/T=13", // db-c-5
      "C/(A3,C6)/T=14",
      "C/(A3,C7)/T=15", // db-c-7
      "C/(A3,C8)/T=21", // db-c-8
    }));   
View Full Code Here

   
    /// Input data ///
    String localMachineName = "C";

    DatabaseVersionHeader currentLocalVersion = null;
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A4,C4)/T=11",
      "A/(A5,C4)/T=12", // db-a-5
      "A/(A6,C4)/T=19", // db-a-6
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {     
      "B/(A3,B2,C4)/T=16",
      "B/(A3,B3,C4)/T=17",
      "B/(A3,B4,C4)/T=18", // db-b-4
      "B/(A3,B5,C4)/T=20", // db-b-5
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
View Full Code Here

    /// Input data ///
    String localMachineName = "C";
   
    DatabaseVersionHeader currentLocalVersion = null;

    DatabaseBranches allBranches = new DatabaseBranches();
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {
      // TODO [lowest] Fix pruning of machine histories -- Is this still an issue?
      // Explanation: Note, this is the full 'B' history, but it does not include
      // the 'pruned' histories or invalid parts of pruned histories.
      // Here: db-b-1 is completely invalid! In other cases, only parts of
      // an old history might be invalid!
       
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
      "A/(A2,C4)/T=9",
      "A/(A3,C4)/T=10",
      "A/(A3,B2,C4)/T=16",
      "A/(A3,B3,C4)/T=17",
      "A/(A3,B4,C4)/T=18", // db-b-4
      "A/(A3,B5,C4)/T=20", // db-b-5
      "B/(A3,B6,C4)/T=23", // db-b-6     
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",       
      "C/(C4)/T=5",
      "A/(A1,C4)/T=8",
View Full Code Here

    System.out.println("----------------");
   
    /// Input data ///
    String localMachineName = "B";
    DatabaseVersionHeader currentLocalVersion = TestDatabaseUtil.createFromString("A/(A1,C4)/T=8");
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {     
      "A/(A1,C4)/T=8",     // last common
      "A/(A2,C4)/T=9",     // first conflicting, wins
     
      "A/(A3,C4)/T=10",    // same as in B
      "A/(A4,C4)/T=11",    // second conflict, wins, winners winner
      "A/(A5,C4)/T=15"     // <<---- WINNERS WINNERS LAST DBV
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {
      "B/(A3,B1,C4)/T=12", // second conflict, loses = winners loser
      "B/(A3,B2,C4)/T=14"   
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "C/(C1)/T=1",
      "C/(C2)/T=2",
      "C/(C3)/T=3",   
      "C/(C4)/T=4",   
      "C/(A1,C5)/T=10", // first conflicting, loses
View Full Code Here

    System.out.println("----------------");
   
    /// Input data ///
    String localMachineName = "D";
    DatabaseVersionHeader currentLocalVersion = TestDatabaseUtil.createFromString("A/(A1,C4)/T=8");
    DatabaseBranches allBranches = new DatabaseBranches();
   
    // A
    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A2,C4)/T=9",     // first conflicting, wins
     
      "A/(A3,C4)/T=10",    // same as in B
      "A/(A4,C4)/T=11",    // second conflict, wins, winners winner
      "A/(A5,B1,C4)/T=14"     // <<---- WINNERS WINNERS LAST DBV
    }));
   
    // B
    allBranches.put("B", TestDatabaseUtil.createBranch(new String[] {
      "B/(A4,B1,C4)/T=12", // second conflict, loses = winners loser
      "B/(A4,B2,C4)/T=15"   
    }));
   
    // C
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] { 
      "C/(A1,C5)/T=10", // first conflicting, loses
    }));   
   
    allBranches.put("D", TestDatabaseUtil.createBranch(new String[] { 
        "C/(C1)/T=1",
        "C/(C2)/T=2",
        "C/(C3)/T=3"
        "C/(C4)/T=4"
        "A/(A1,C4)/T=8",     // last common - current DBV in B!
View Full Code Here

     */
   
    /// Input data ///
    String localMachineName = "C";
    DatabaseVersionHeader currentLocalVersion = TestDatabaseUtil.createFromString("A/(A1)/T=1376074225169");
    DatabaseBranches allBranches = new DatabaseBranches();

    allBranches.put("A", TestDatabaseUtil.createBranch(new String[] {
      "A/(A1)/T=1376074225169",
      "A/(A2)/T=1376074225230",
    }));
   
    allBranches.put("C", TestDatabaseUtil.createBranch(new String[] {
      "A/(A1)/T=1376074225169",
    }));
       
    /// Expected results ///
    TestResult expectedTestResult = new TestResult();
View Full Code Here

TOP

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

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.