Skip to content

Commit

Permalink
[Test] More randomization for snapshot names (elastic#107884)
Browse files Browse the repository at this point in the history
Increase the randomization for snapshot names to avoid duplicates which
fail to create map in test. See similar fix elastic#101603

Resolves: elastic#107816
  • Loading branch information
ywangd authored Apr 26, 2024
1 parent fe76770 commit 0b747ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private SnapshotInfo makeFailureInfo(long startTime) {
}
assert failureCount == failures.size();
SnapshotInfo snapInfo = new SnapshotInfo(
new Snapshot(REPO, new SnapshotId("snap-fail-" + randomAlphaOfLength(3), "uuid-fail")),
new Snapshot(REPO, new SnapshotId("snap-fail-" + randomUUID(), "uuid-fail")),
Collections.singletonList("foo-fail"),
Collections.singletonList("bar-fail"),
Collections.emptyList(),
Expand Down Expand Up @@ -377,7 +377,7 @@ private SnapshotInfo makePartialInfo(long startTime) {
}
assert failureCount == failures.size();
SnapshotInfo snapInfo = new SnapshotInfo(
new Snapshot(REPO, new SnapshotId("snap-fail-" + randomAlphaOfLength(3), "uuid-fail")),
new Snapshot(REPO, new SnapshotId("snap-fail-" + randomUUID(), "uuid-fail")),
Collections.singletonList("foo-fail"),
Collections.singletonList("bar-fail"),
Collections.emptyList(),
Expand Down

0 comments on commit 0b747ac

Please sign in to comment.