-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve gradleCheckFlakyTestDetector library
Signed-off-by: Prudhvi Godithi <[email protected]>
- Loading branch information
1 parent
910cb54
commit 67890bd
Showing
17 changed files
with
585 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ coverage: | |
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 0.2% | ||
target: 70% | ||
threshold: 3% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package gradlecheck | ||
|
||
class MarkdownComparator { | ||
|
||
ArrayList<String> testReportMarkDownTable | ||
ArrayList<String> gitHubMarkDownTable | ||
|
||
MarkdownComparator(ArrayList<String> testReportMarkDownTable, ArrayList<String> gitHubMarkDownTable) { | ||
this.testReportMarkDownTable = testReportMarkDownTable | ||
this.gitHubMarkDownTable = gitHubMarkDownTable | ||
} | ||
|
||
def markdownComparison() { | ||
def differences = testReportMarkDownTable.findAll { ghRow -> | ||
!gitHubMarkDownTable.any { compRow -> | ||
ghRow['Git Reference'] == compRow['Git Reference'] && | ||
ghRow['Merged Pull Request'] == compRow['Merged Pull Request'] && | ||
ghRow['Build Details'] == compRow['Build Details'] && | ||
ghRow['Test Name'] == compRow['Test Name'] | ||
} | ||
} | ||
return differences | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package gradlecheck | ||
|
||
class ParseMarkDownTable { | ||
String markdown | ||
|
||
ParseMarkDownTable(String markdown) { | ||
this.markdown = markdown | ||
} | ||
|
||
def parseMarkdownTableRows() { | ||
def rows = markdown.split("\\|\\s*\\n") | ||
rows = rows[2..-2] // Skipping headers and footer | ||
return rows.collect { row -> | ||
def cells = row.split("\\|\\s*") | ||
return [ | ||
'Git Reference': cells[1].trim(), | ||
'Merged Pull Request': cells[2].trim(), | ||
'Build Details': cells[3].trim(), | ||
'Test Name': cells[4].trim() | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.