@Test
public void testFaultyInitOperation() throws Exception {
// Create an unreliable connection
List<String> failingOperationsPattern = Lists.newArrayList("rel=1.*op=upload");
InitOperationOptions operationOptions = TestConfigUtil.createTestUnreliableInitOperationOptions("A", failingOperationsPattern);
InitOperation op = new InitOperation(operationOptions, null);
File repoDir = ((UnreliableLocalTransferSettings) operationOptions.getConfigTO().getTransferSettings()).getPath();
File localDir = new File(operationOptions.getLocalDir(), ".syncany");
try {
op.execute();
}
catch (StorageException e) {
logger.log(Level.INFO, "This operation failed because of the unreliable connection.");
}