Skip to content

Commit

Permalink
[Test] Disable rare actions in RepoAnalysisFailureIT (elastic#104109)
Browse files Browse the repository at this point in the history
Rare actions are disabled to improve CI stability.

Resolves: elastic#103791
  • Loading branch information
ywangd authored Jan 23, 2024
1 parent e49db65 commit b2977d5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ public void testFailsOnChecksumMismatch() {
final RepositoryAnalyzeAction.Request request = new RepositoryAnalyzeAction.Request("test-repo");
request.maxBlobSize(ByteSizeValue.ofBytes(10L));
request.abortWritePermitted(false);
// The analysis can perform writeAndOverwrite as a rare action.
// Since a read is performed towards the end of overwrite or write (rarely),
// it can return either the old (write) or the new (overwrite) content and both
// are considered to be correct.
// This test disrupts reads and relies on the disrupted content to be different from
// correct contents to trigger the expected failure. However, in rare cases,
// the disrupted old content could be identical to the new content or vice versa which
// leads to CI failures. Therefore, we disable rare actions to improve CI stability.
request.rareActionProbability(0.0);

final CountDown countDown = new CountDown(between(1, request.getBlobCount()));

Expand Down

0 comments on commit b2977d5

Please sign in to comment.