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 committed Apr 26, 2024
1 parent 5350d7e commit b4d0bc4
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 b4d0bc4

Please sign in to comment.