Skip to content

Commit c2d1eba

Browse files
committed
Run cassandra test last in separate vm
It’s super slow and uses a lot of memory.
1 parent e8bbc84 commit c2d1eba

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

dd-java-agent-ittests/dd-java-agent-ittests.gradle

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,37 @@ test {
6060
if (project.hasProperty("disableShadowRelocate") && disableShadowRelocate) {
6161
exclude 'com/datadoghq/agent/ShadowPackageRenamingTest.class'
6262
}
63+
64+
useJUnit {
65+
excludeCategories 'com.datadoghq.agent.integration.ExpensiveTest'
66+
}
67+
}
68+
69+
task expensiveTest(type: Test) {
70+
jvmArgs "-Ddd.trace.configurationFile=${project.buildDir}/resources/test/dd-trace.yaml"
71+
jvmArgs "-Ddd.slf4j.simpleLogger.defaultLogLevel=debug"
72+
jvmArgs "-Dorg.slf4j.simpleLogger.defaultLogLevel=debug"
73+
jvmArgs "-Ddd.deps.org.jboss.byteman.verbose=true"
74+
jvmArgs "-Dorg.jboss.byteman.verbose=true"
75+
76+
doFirst {
77+
// Defining here to allow jacoco to be first on the command line.
78+
jvmArgs "-javaagent:${project(':dd-java-agent').tasks.shadowJar.archivePath}"
79+
}
80+
81+
testLogging {
82+
events "started"
83+
}
84+
85+
if (project.hasProperty("disableShadowRelocate") && disableShadowRelocate) {
86+
exclude 'com/datadoghq/agent/ShadowPackageRenamingTest.class'
87+
}
88+
89+
useJUnit {
90+
includeCategories 'com.datadoghq.agent.integration.ExpensiveTest'
91+
}
6392
}
93+
test.finalizedBy expensiveTest
6494

6595
test.dependsOn project(':dd-java-agent').shadowJar
6696

dd-java-agent-ittests/src/test/java/com/datadoghq/agent/integration/CassandraIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
import org.junit.After;
1313
import org.junit.Before;
1414
import org.junit.Test;
15+
import org.junit.experimental.categories.Category;
1516

1617
/** Created by gpolaert on 6/2/17. */
18+
@Category(ExpensiveTest.class)
1719
public class CassandraIntegrationTest {
1820

1921
@Before
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.datadoghq.agent.integration;
2+
3+
interface ExpensiveTest {}

0 commit comments

Comments
 (0)