Skip to content

Commit 747060c

Browse files
andrrosstqranjan
authored andcommitted
Use 'FIXED' path type in DedicatedClusterSnapshotRestoreIT (opensearch-project#17996)
Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Tanishq Ranjan <tqranjan@amazon.com>
1 parent 472c434 commit 747060c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
import org.opensearch.core.xcontent.NamedXContentRegistry;
7070
import org.opensearch.core.xcontent.XContentParser;
7171
import org.opensearch.env.Environment;
72+
import org.opensearch.index.remote.RemoteStoreEnums;
7273
import org.opensearch.index.seqno.RetentionLeaseActions;
7374
import org.opensearch.index.seqno.RetentionLeases;
7475
import org.opensearch.indices.recovery.PeerRecoveryTargetService;
@@ -450,7 +451,12 @@ public void testSnapshotWithStuckNode() throws Exception {
450451
createRepository(
451452
"test-repo",
452453
"mock",
453-
Settings.builder().put("location", repo).put("random", randomAlphaOfLength(10)).put("wait_after_unblock", 200)
454+
Settings.builder()
455+
.put("location", repo)
456+
.put("random", randomAlphaOfLength(10))
457+
.put("wait_after_unblock", 200)
458+
// TODO: There's likely a bug with other path types where cleanup seems to leave unexpected files
459+
.put(BlobStoreRepository.SHARD_PATH_TYPE.getKey(), RemoteStoreEnums.PathType.FIXED)
454460
);
455461

456462
// Pick one node and block it

test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2674,7 +2674,7 @@ public static PutRepositoryRequestBuilder putRepositoryRequestBuilder(
26742674
if (timeout != null) {
26752675
builder.setTimeout(timeout);
26762676
}
2677-
if (finalSettings == false) {
2677+
if (finalSettings == false && settings.keys().contains(BlobStoreRepository.SHARD_PATH_TYPE.getKey()) == false) {
26782678
settings.put(BlobStoreRepository.SHARD_PATH_TYPE.getKey(), randomFrom(PathType.values()));
26792679
}
26802680
builder.setSettings(settings);

0 commit comments

Comments
 (0)