Skip to content

Commit

Permalink
Fix flaky test query
Browse files Browse the repository at this point in the history
  • Loading branch information
tvrg committed Jul 19, 2022
1 parent 8a63a9f commit 7944212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func InsertTests(db *sqlx.DB, tests []model.TestResult, upload model.Upload) err
func GetFlakyTests(db *sqlx.DB) ([]FlakyTest, error) {
rows, err := db.Queryx(`
WITH flaky_tests (id, name) AS (
SELECT tests.id, tests.name FROM results
SELECT DISTINCT(tests.id), tests.name FROM results
LEFT JOIN tests ON tests.id = results.test_id
GROUP BY results.test_id, results.commit_id
HAVING COUNT(DISTINCT results.success) > 1
Expand Down

0 comments on commit 7944212

Please sign in to comment.