Skip to content

Commit

Permalink
NO-JIRA: Fix flaky IT
Browse files Browse the repository at this point in the history
Due to possible parallel analysis of the changing of the preference page and the editor being opened, it is changed to close the file before doing changes and then re-opening to trigger analyses synchronously.
RedDeer is to fast when it comes to UI actions.
  • Loading branch information
thahnen committed Aug 15, 2024
1 parent d99045d commit 094c780
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@ public void ruleParametersGlobalDefaults() {
var rootProject = importExistingProjectIntoWorkspace("java/java-exclude-rules", "java-exclude-rules");

openFileAndWaitForAnalysisCompletion(rootProject.getResource("src", "hello", "Hello3.java"));

checkIssueIsDefault();
doAndWaitForSonarLintAnalysisJob(() -> lowerCognitiveComplexityRuleParameter());
checkIssueChanged();
new DefaultEditor().close();

doAndWaitForSonarLintAnalysisJob(() -> restoreDefaultRulesConfiguration());
lowerCognitiveComplexityRuleParameter();
openFileAndWaitForAnalysisCompletion(rootProject.getResource("src", "hello", "Hello3.java"));
checkIssueChanged();
new DefaultEditor().close();

restoreDefaultRulesConfiguration();
openFileAndWaitForAnalysisCompletion(rootProject.getResource("src", "hello", "Hello3.java"));
checkIssueIsDefault();
}

Expand Down

0 comments on commit 094c780

Please sign in to comment.