@Ignore
public void testMixedScenario1() throws Exception {
// Setup
TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
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();
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());
clientB.createNewFile("B1,C3");
clientB.up();
clientA.createNewFile("A1,C4");
clientA.up();
clientA.createNewFile("A2,C4");
clientA.up();
clientA.createNewFile("A3,C4");
clientA.up();
clientB.down(); // CONFLICT 1
fail("Add some asserts");
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
clientA.down(); // CONFLICT 2
clientC.down(); // CONFLICT 3
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
assertFileListEquals(clientB.getLocalFilesExcludeLockedAndNoRead(), clientC.getLocalFilesExcludeLockedAndNoRead());
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();
clientB.createNewFile("A3,B2,C4");
clientB.up();
clientB.createNewFile("A3,B3,C4");
clientB.up();
clientB.createNewFile("A3,B4,C4");
clientB.up();
clientA.createNewFile("A6,C4");
clientA.up();
clientB.createNewFile("A3,B5,C4");
clientB.up();
clientC.createNewFile("A3,C8");
clientC.up();
clientB.down(); // CONFLICT 4
clientA.down(); // CONFLICT 5
clientC.down(); // CONFLICT 6
clientA.up();
clientA.down();
clientB.up();
clientB.down();
clientC.up();
clientC.down();
clientC.up();
clientB.up();
clientC.down(); // CONFLICT 7
clientB.down(); // CONFLICT 8
clientA.down(); // CONFLICT 9
assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
assertFileListEquals(clientB.getLocalFilesExcludeLockedAndNoRead(), clientC.getLocalFilesExcludeLockedAndNoRead());
assertEquals("File list count does not match.", 19, clientA.getLocalFilesExcludeLockedAndNoRead().size());
// Tear down
clientA.deleteTestData();
clientB.deleteTestData();
clientC.deleteTestData();
}