Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry flaky tests #449

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
## [Unreleased]
### Added
- Github workflow for changelog verification ([#440](https://github.com/opensearch-project/flow-framework/pull/440))
- Retry flaky tests ([#449](https://github.com/opensearch-project/flow-framework/pull/449))
owaiskazi19 marked this conversation as resolved.
Show resolved Hide resolved

### Changed

Expand Down
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ buildscript {

plugins {
id "de.undercouch.download" version "5.5.0"
id "org.gradle.test-retry" version "1.5.4" apply false
}

apply plugin: 'java'
Expand Down Expand Up @@ -405,6 +406,19 @@ task integTestRemote(type: RestIntegTestTask) {
}
}


// test retry configuration
owaiskazi19 marked this conversation as resolved.
Show resolved Hide resolved
subprojects {
apply plugin: "org.gradle.test-retry"
tasks.withType(Test).configureEach {
retry {
failOnPassedAfterRetry = false
maxRetries = 3
maxFailures = 10
owaiskazi19 marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

// Automatically sets up the integration test cluster locally
run {
doFirst {
Expand Down