|
1 | 1 | package datadog.smoketest |
2 | 2 |
|
3 | | - |
4 | 3 | import datadog.trace.api.Config |
5 | 4 | import datadog.trace.api.Platform |
6 | 5 | import datadog.trace.api.config.CiVisibilityConfig |
7 | 6 | import datadog.trace.api.config.GeneralConfig |
| 7 | +import datadog.trace.api.config.TraceInstrumentationConfig |
8 | 8 | import datadog.trace.util.Strings |
9 | 9 | import org.gradle.testkit.runner.BuildResult |
10 | 10 | import org.gradle.testkit.runner.GradleRunner |
11 | 11 | import org.gradle.testkit.runner.TaskOutcome |
12 | 12 | import org.gradle.util.DistributionLocator |
13 | 13 | import org.gradle.util.GradleVersion |
14 | | -import org.gradle.wrapper.Download |
15 | | -import org.gradle.wrapper.GradleUserHomeLookup |
16 | | -import org.gradle.wrapper.Install |
17 | | -import org.gradle.wrapper.PathAssembler |
18 | | -import org.gradle.wrapper.WrapperConfiguration |
| 14 | +import org.gradle.wrapper.* |
19 | 15 | import spock.lang.IgnoreIf |
20 | 16 | import spock.lang.Shared |
21 | 17 | import spock.lang.TempDir |
@@ -133,6 +129,16 @@ class GradleDaemonSmokeTest extends AbstractGradleTest { |
133 | 129 | "${Strings.propertyNameToSystemPropertyName(CiVisibilityConfig.CIVISIBILITY_AGENTLESS_ENABLED)}=true," + |
134 | 130 | "${Strings.propertyNameToSystemPropertyName(CiVisibilityConfig.CIVISIBILITY_GIT_UPLOAD_ENABLED)}=false," + |
135 | 131 | "${Strings.propertyNameToSystemPropertyName(CiVisibilityConfig.CIVISIBILITY_CIPROVIDER_INTEGRATION_ENABLED)}=false," + |
| 132 | + /* |
| 133 | + * Some of the smoke tests (in particular the one with the Gradle plugin), are using Gradle Test Kit for their tests. |
| 134 | + * Gradle Test Kit needs to do a "chmod" when starting a Gradle Daemon. |
| 135 | + * This "chmod" operation is traced by datadog.trace.instrumentation.java.lang.ProcessImplInstrumentation and is reported as a span. |
| 136 | + * The problem is that the "chmod" only happens when running in CI (could be due to differences in OS or FS permissions), |
| 137 | + * so when running the tests locally, the "chmod" span is not there. |
| 138 | + * This causes the tests to fail because the number of reported traces is different. |
| 139 | + * To avoid this discrepancy between local and CI runs, we disable tracing instrumentations. |
| 140 | + */ |
| 141 | + "${Strings.propertyNameToSystemPropertyName(TraceInstrumentationConfig.TRACE_ENABLED)}=false," + |
136 | 142 | "${Strings.propertyNameToSystemPropertyName(CiVisibilityConfig.CIVISIBILITY_JACOCO_PLUGIN_VERSION)}=$JACOCO_PLUGIN_VERSION," + |
137 | 143 | "${Strings.propertyNameToSystemPropertyName(CiVisibilityConfig.CIVISIBILITY_AGENTLESS_URL)}=${mockBackend.intakeUrl}" |
138 | 144 |
|
|
0 commit comments