From c63701c5c7608bd8d9381c3c7539c1716f7d20c4 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Thu, 14 Nov 2013 18:13:49 -0500 Subject: [PATCH] Improve snapshot/restore test speed --- .../snapshots/SharedClusterSnapshotRestoreTests.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java b/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java index 5fd3f8e1301..f23b12f482c 100644 --- a/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java +++ b/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java @@ -72,7 +72,7 @@ public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests { .setType("fs").setSettings(ImmutableSettings.settingsBuilder() .put("location", newTempDir(LifecycleScope.SUITE)) .put("compress", randomBoolean()) - .put("chunk_size", randomIntBetween(5, 100)) + .put("chunk_size", randomIntBetween(100, 1000)) ).get(); assertThat(putRepositoryResponse.isAcknowledged(), equalTo(true)); @@ -514,7 +514,9 @@ public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests { logger.info("--> creating repository at " + repo.getAbsolutePath()); PutRepositoryResponse putRepositoryResponse = client.admin().cluster().preparePutRepository("test-repo") .setType("fs").setSettings(ImmutableSettings.settingsBuilder() - .put("location", repo).put("compress", false).put("chunk_size", atLeast(5)) + .put("location", repo) + .put("compress", false) + .put("chunk_size", randomIntBetween(100, 1000)) ).get(); assertThat(putRepositoryResponse.isAcknowledged(), equalTo(true)); @@ -741,7 +743,7 @@ public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests { .setType("fs").setSettings(ImmutableSettings.settingsBuilder() .put("location", repositoryLocation) .put("compress", randomBoolean()) - .put("chunk_size", randomIntBetween(5, 100)) + .put("chunk_size", randomIntBetween(100, 1000)) ).get(); assertThat(putRepositoryResponse.isAcknowledged(), equalTo(true));