Package org.syncany.plugins.unreliable_local

Examples of org.syncany.plugins.unreliable_local.UnreliableLocalTransferPlugin


    assertTrue(transactionTO.getActions().get(1).getRemoteFile().getName().contains("multichunk-"));
    assertTrue(transactionTO.getActions().get(2).getRemoteFile().getName().contains("database-"));

    // 2. Double check if list() does not return the multichunk
    TransferManager transferManager = new TransactionAwareTransferManager(
        new UnreliableLocalTransferPlugin().createTransferManager(testConnection, null), null);
    Map<String, MultichunkRemoteFile> multiChunkList = transferManager.list(MultichunkRemoteFile.class);
    assertEquals(0, multiChunkList.size());

    // 3. Second try fails in the beginning, to see if cleanTransactions was successful
    boolean secondUpFailed = false;
View Full Code Here


    assertTrue(transactionTO.getActions().get(1).getRemoteFile().getName().contains("multichunk-"));
    assertTrue(transactionTO.getActions().get(2).getRemoteFile().getName().contains("database-"));

    // 2. Double check if list() does not return the multichunk
    TransferManager transferManager = new TransactionAwareTransferManager(
        new UnreliableLocalTransferPlugin().createTransferManager(testConnection, null), null);
    Map<String, MultichunkRemoteFile> multiChunkList = transferManager.list(MultichunkRemoteFile.class);
    assertEquals(0, multiChunkList.size());

    // 3. Second try fails in the beginning, to see if cleanTransactions was successful
    boolean secondUpFailed = false;
View Full Code Here

      cleanupFailed = true;
    }

    assertTrue(cleanupFailed);
    TransferManager transferManager = new TransactionAwareTransferManager(
        new UnreliableLocalTransferPlugin().createTransferManager(testConnection, null), null);
    assertEquals(2, transferManager.list(MultichunkRemoteFile.class).size());
    assertEquals(2, new File(testConnection.getPath(), "multichunks").list().length);
    assertEquals(2, transferManager.list(DatabaseRemoteFile.class).size());
    assertEquals(2, new File(testConnection.getPath(), "databases").list().length);
    assertEquals(1, transferManager.list(TransactionRemoteFile.class).size());
View Full Code Here

      cleanupFailed = true;
    }

    assertTrue(cleanupFailed);
    TransferManager transferManager = new TransactionAwareTransferManager(
        new UnreliableLocalTransferPlugin().createTransferManager(testConnection, null), null);
    assertEquals(2, transferManager.list(MultichunkRemoteFile.class).size());
    assertEquals(2, new File(testConnection.getPath(), "multichunks").list().length);

    // Note that the list here differs from the actual files, because the transaction fails
    // while deletions have been done
View Full Code Here

    catch (StorageException e) {
      cleanupFailed = true;
    }

    TransferManager transferManager = new TransactionAwareTransferManager(
        new UnreliableLocalTransferPlugin().createTransferManager(testConnection, null), null);

    assertTrue(cleanupFailed);
    assertEquals(2, transferManager.list(MultichunkRemoteFile.class).size());
    assertEquals(2, new File(testConnection.getPath(), "multichunks").list().length);
View Full Code Here

    return conn;
  }

  public static UnreliableLocalTransferSettings createTestUnreliableLocalConnection(List<String> failingOperationPatterns) throws Exception {
    UnreliableLocalTransferPlugin unreliableLocalPlugin = new UnreliableLocalTransferPlugin();
    UnreliableLocalTransferSettings unreliableLocalConnection = createTestUnreliableLocalConnectionWithoutInit(unreliableLocalPlugin,
        failingOperationPatterns);

    unreliableLocalPlugin.createTransferManager(unreliableLocalConnection, null).init(true);

    return unreliableLocalConnection;
  }
View Full Code Here

TOP

Related Classes of org.syncany.plugins.unreliable_local.UnreliableLocalTransferPlugin

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.