-
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.
Dont instrument
@Decorator
s or CDI breaks
- Loading branch information
1 parent
6512c4b
commit e161664
Showing
4 changed files
with
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apply from: "${rootDir}/gradle/java.gradle" | ||
|
||
apply plugin: 'org.unbroken-dome.test-sets' | ||
|
||
testSets { | ||
latestDepTest { | ||
dirName = 'test' | ||
} | ||
} | ||
|
||
dependencies { | ||
testCompile project(':dd-java-agent:instrumentation:java-concurrent') | ||
|
||
testCompile group: 'org.jboss.weld', name: 'weld-core', version: '2.3.0.Final' | ||
testCompile group: 'org.jboss.weld.se', name: 'weld-se', version: '2.3.0.Final' | ||
testCompile group: 'org.jboss.weld.se-core', name: 'weld-se-core', version: '2.3.0.Final' | ||
|
||
// Beyond 2.x is CDI 2+ and requires Java 8 | ||
latestDepTestCompile group: 'org.jboss.weld', name: 'weld-core', version: '2.+' | ||
latestDepTestCompile group: 'org.jboss.weld.se', name: 'weld-se', version: '2.+' | ||
latestDepTestCompile group: 'org.jboss.weld.se-core', name: 'weld-se-core', version: '2.+' | ||
} |
23 changes: 23 additions & 0 deletions
23
dd-java-agent/instrumentation/cdi-1.2/src/test/groovy/CDIContainerTest.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,23 @@ | ||
import datadog.trace.agent.test.AgentTestRunner | ||
import org.jboss.weld.environment.se.Weld | ||
import org.jboss.weld.environment.se.WeldContainer | ||
import org.jboss.weld.environment.se.threading.RunnableDecorator | ||
|
||
class CDIContainerTest extends AgentTestRunner { | ||
|
||
def "CDI container starts with agent"() { | ||
given: | ||
Weld builder = new Weld() | ||
.disableDiscovery() | ||
.decorators(RunnableDecorator) | ||
|
||
when: | ||
WeldContainer container = builder.initialize() | ||
|
||
then: | ||
container.isRunning() | ||
|
||
cleanup: | ||
container?.shutdown() | ||
} | ||
} |
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