-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b24d153
commit af973a0
Showing
54 changed files
with
4,271 additions
and
52 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
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
36 changes: 36 additions & 0 deletions
36
...i-visibility/src/main/java/datadog/trace/civisibility/execution/RunOnceIgnoreOutcome.java
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,36 @@ | ||
package datadog.trace.civisibility.execution; | ||
|
||
import datadog.trace.api.civisibility.execution.TestExecutionPolicy; | ||
import datadog.trace.api.civisibility.telemetry.tag.RetryReason; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* Runs a test case once. If it fails - suppresses the failure so that the build status is not | ||
* affected. | ||
*/ | ||
public class RunOnceIgnoreOutcome implements TestExecutionPolicy { | ||
|
||
private boolean testExecuted; | ||
|
||
@Override | ||
public boolean applicable() { | ||
return !testExecuted; | ||
} | ||
|
||
@Override | ||
public boolean suppressFailures() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean retry(boolean successful, long durationMillis) { | ||
testExecuted = true; | ||
return false; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public RetryReason currentExecutionRetryReason() { | ||
return null; | ||
} | ||
} |
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
Oops, something went wrong.