-
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.
Add smoke tests for telemetry (#7955)
- Loading branch information
Showing
12 changed files
with
183 additions
and
0 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
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
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
19 changes: 19 additions & 0 deletions
19
dd-smoke-tests/src/main/groovy/datadog/smoketest/RunLast.groovy
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,19 @@ | ||
package datadog.smoketest | ||
|
||
import org.spockframework.runtime.extension.ExtensionAnnotation | ||
|
||
import java.lang.annotation.ElementType | ||
import java.lang.annotation.Retention | ||
import java.lang.annotation.RetentionPolicy | ||
import java.lang.annotation.Target | ||
|
||
/** | ||
* Spock test methods annotated with this will be executed last. | ||
* This is useful for tests that need to wait for some test to settle while other tests run (e.g. telemetry), so it is | ||
* more efficient to run them at the end. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target([ElementType.METHOD]) | ||
@ExtensionAnnotation(RunLastExtension) | ||
@interface RunLast { | ||
} |
13 changes: 13 additions & 0 deletions
13
dd-smoke-tests/src/main/groovy/datadog/smoketest/RunLastExtension.groovy
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,13 @@ | ||
package datadog.smoketest | ||
|
||
import org.spockframework.runtime.extension.IAnnotationDrivenExtension | ||
import org.spockframework.runtime.model.FeatureInfo | ||
|
||
class RunLastExtension implements IAnnotationDrivenExtension<RunLast> { | ||
@Override | ||
void visitFeatureAnnotations(List<RunLast> annotations, FeatureInfo feature) { | ||
if (!annotations.isEmpty()) { | ||
feature.setExecutionOrder(Integer.MAX_VALUE) | ||
} | ||
} | ||
} |