Search in sources :

Example 21 with UnreliableLocalTransferSettings

use of org.syncany.plugins.unreliable_local.UnreliableLocalTransferSettings in project syncany by syncany.

the class TestConfigUtil method createTestUnreliableLocalConnectionWithoutInit.

public static UnreliableLocalTransferSettings createTestUnreliableLocalConnectionWithoutInit(UnreliableLocalTransferPlugin unreliableLocalPlugin, List<String> failingOperationPatterns) throws Exception {
    UnreliableLocalTransferSettings unreliableLocalConnection = unreliableLocalPlugin.createEmptySettings();
    File tempRepoDir = TestFileUtil.createTempDirectoryInSystemTemp(createUniqueName("repo", new Random().nextFloat()));
    unreliableLocalConnection.setPath(tempRepoDir);
    unreliableLocalConnection.setFailingOperationPatterns(failingOperationPatterns);
    return unreliableLocalConnection;
}
Also used : Random(java.util.Random) UnreliableLocalTransferSettings(org.syncany.plugins.unreliable_local.UnreliableLocalTransferSettings) File(java.io.File)

Aggregations

UnreliableLocalTransferSettings (org.syncany.plugins.unreliable_local.UnreliableLocalTransferSettings)21 Test (org.junit.Test)18 TestClient (org.syncany.tests.util.TestClient)17 File (java.io.File)16 StorageException (org.syncany.plugins.transfer.StorageException)12 MultichunkRemoteFile (org.syncany.plugins.transfer.files.MultichunkRemoteFile)10 CleanupOperationOptions (org.syncany.operations.cleanup.CleanupOperationOptions)7 CleanupOperationResult (org.syncany.operations.cleanup.CleanupOperationResult)6 UpOperationOptions (org.syncany.operations.up.UpOperationOptions)6 FilenameFilter (java.io.FilenameFilter)5 Persister (org.simpleframework.xml.core.Persister)5 TransferManager (org.syncany.plugins.transfer.TransferManager)5 TransactionAware (org.syncany.plugins.transfer.features.TransactionAware)5 DatabaseRemoteFile (org.syncany.plugins.transfer.files.DatabaseRemoteFile)5 TransactionTO (org.syncany.plugins.transfer.to.TransactionTO)5 ActionRemoteFile (org.syncany.plugins.transfer.files.ActionRemoteFile)4 RemoteFile (org.syncany.plugins.transfer.files.RemoteFile)4 TempRemoteFile (org.syncany.plugins.transfer.files.TempRemoteFile)4 TransactionRemoteFile (org.syncany.plugins.transfer.files.TransactionRemoteFile)4 InitOperationOptions (org.syncany.operations.init.InitOperationOptions)2