diff --git a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/build.gradle b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/build.gradle index 2e036a050e1..6625bc50fb0 100644 --- a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/build.gradle +++ b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/build.gradle @@ -49,6 +49,8 @@ dependencies { // needed for kinesis: testImplementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: versions.jackson + testImplementation group: 'org.json', name: 'json', version: '20231013' + test_before_1_11_106Implementation(group: 'com.amazonaws', name: 'aws-java-sdk-s3') { version { diff --git a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWS1ClientTest.groovy b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWS1ClientTest.groovy index 9bf73151744..9874e1a5510 100644 --- a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWS1ClientTest.groovy +++ b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWS1ClientTest.groovy @@ -39,6 +39,7 @@ import datadog.trace.api.Config import datadog.trace.api.DDSpanTypes import datadog.trace.bootstrap.instrumentation.api.Tags import datadog.trace.test.util.Flaky +import org.json.XML import spock.lang.AutoCleanup import spock.lang.Shared @@ -61,12 +62,23 @@ abstract class AWS1ClientTest extends VersionedNamingTestBase { def credentialsProvider = new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()) @Shared def responseBody = new AtomicReference() + @Shared + def jsonPointer = new AtomicReference() + @AutoCleanup @Shared def server = httpServer { handlers { all { - response.status(200).send(responseBody.get()) + def body = responseBody.get() + if (request.headers.get("Content-Type")?.contains("json")) { + def json = XML.toJSONObject(body) + if (jsonPointer.get() != null) { + json = json.query(jsonPointer.get()) + } + body = json.toString() + } + response.status(200).send(body) } } } @@ -131,6 +143,7 @@ abstract class AWS1ClientTest extends VersionedNamingTestBase { def "send #operation request with mocked response"() { setup: responseBody.set(body) + jsonPointer.set(jsonPointerStr) when: def response = call.call(client) @@ -181,19 +194,22 @@ abstract class AWS1ClientTest extends VersionedNamingTestBase { server.lastRequest.headers.get("x-datadog-trace-id") == null server.lastRequest.headers.get("x-datadog-parent-id") == null + cleanup: + jsonPointer.set(null) + where: - service | operation | method | path | client | call | additionalTags | body | peerService - "S3" | "CreateBucket" | "PUT" | "/testbucket/" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createBucket("testbucket") } | ["aws.bucket.name": "testbucket", "bucketname": "testbucket"] | "" | "aws.bucket.name" - "S3" | "GetObject" | "GET" | "/someBucket/someKey" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.getObject("someBucket", "someKey") } | ["aws.bucket.name": "someBucket", "bucketname": "someBucket"] | "" | "aws.bucket.name" - "DynamoDBv2" | "CreateTable" | "POST" | "/" | AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createTable(new CreateTableRequest("sometable", null)) } | ["aws.table.name": "sometable", "tablename": "sometable"] | "" | "aws.table.name" - "Kinesis" | "DeleteStream" | "POST" | "/" | AmazonKinesisClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteStream(new DeleteStreamRequest().withStreamName("somestream")) } | ["aws.stream.name": "somestream", "streamname": "somestream"] | "" | "aws.stream.name" + service | operation | method | path | client | call | additionalTags | body | peerService | jsonPointerStr + "S3" | "CreateBucket" | "PUT" | "/testbucket/" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createBucket("testbucket") } | ["aws.bucket.name": "testbucket", "bucketname": "testbucket"] | "" | "aws.bucket.name" | null + "S3" | "GetObject" | "GET" | "/someBucket/someKey" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.getObject("someBucket", "someKey") } | ["aws.bucket.name": "someBucket", "bucketname": "someBucket"] | "" | "aws.bucket.name" | null + "DynamoDBv2" | "CreateTable" | "POST" | "/" | AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createTable(new CreateTableRequest("sometable", null)) } | ["aws.table.name": "sometable", "tablename": "sometable"] | "" | "aws.table.name" | null + "Kinesis" | "DeleteStream" | "POST" | "/" | AmazonKinesisClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteStream(new DeleteStreamRequest().withStreamName("somestream")) } | ["aws.stream.name": "somestream", "streamname": "somestream"] | "" | "aws.stream.name" | null "SQS" | "CreateQueue" | "POST" | "/" | AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createQueue(new CreateQueueRequest("somequeue")) } | ["aws.queue.name": "somequeue", "queuename": "somequeue"] | """ https://queue.amazonaws.com/123456789012/MyQueue 7a62c49f-347e-4fc4-9331-6e8e7a96aa73 - """ | "aws.queue.name" + """ | "aws.queue.name" | "/CreateQueueResponse/CreateQueueResult" "SQS" | "SendMessage" | "POST" | "/someurl" | AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.sendMessage(new SendMessageRequest("someurl", "")) } | ["aws.queue.url": "someurl"] | """ @@ -203,7 +219,7 @@ abstract class AWS1ClientTest extends VersionedNamingTestBase { 27daac76-34dd-47df-bd01-1f6e873584a0 - """ | "aws.queue.url" + """ | "aws.queue.url" | "/SendMessageResponse/SendMessageResult" "SNS" | "Publish" | "POST" | "/" | AmazonSNSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.publish(new PublishRequest("arn:aws:sns::123:some-topic", "")) } | ["aws.topic.name": "some-topic", "topicname": "some-topic"] | """ @@ -211,22 +227,21 @@ abstract class AWS1ClientTest extends VersionedNamingTestBase { d74b8436-ae13-5ab4-a9ff-ce54dfea72a0 - """ | "aws.topic.name" + """ | "aws.topic.name" | "/PublishResponse/PublishResult" "EC2" | "AllocateAddress" | "POST" | "/" | AmazonEC2ClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.allocateAddress() } | [:] | """ 59dbff89-35bd-4eac-99ed-be587EXAMPLE 192.0.2.1 standard - """ | null - + """ | null | "/AllocateAddressResponse" "RDS" | "DeleteOptionGroup" | "POST" | "/" | AmazonRDSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteOptionGroup(new DeleteOptionGroupRequest()) } | [:] | """ 0ac9cda2-bbf4-11d3-f92b-31fa5e8dbc99 - """ | null + """ | null | null } def "send #operation request to closed port"() { diff --git a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/LegacyAWS1ClientForkedTest.groovy b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/LegacyAWS1ClientForkedTest.groovy index e59540b4ab5..a03133a45c8 100644 --- a/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/LegacyAWS1ClientForkedTest.groovy +++ b/dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/LegacyAWS1ClientForkedTest.groovy @@ -36,6 +36,7 @@ import datadog.trace.bootstrap.instrumentation.api.Tags import datadog.trace.test.util.Flaky import org.apache.http.conn.HttpHostConnectException import org.apache.http.impl.execchain.RequestAbortedException +import org.json.XML import spock.lang.AutoCleanup import spock.lang.Shared @@ -68,12 +69,23 @@ class LegacyAWS1ClientForkedTest extends AgentTestRunner { def credentialsProvider = new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()) @Shared def responseBody = new AtomicReference() + @Shared + def jsonPointer = new AtomicReference() + @AutoCleanup @Shared def server = httpServer { handlers { all { - response.status(200).send(responseBody.get()) + def body = responseBody.get() + if (request.headers.get("Content-Type")?.contains("json")) { + def json = XML.toJSONObject(body) + if (jsonPointer.get() != null) { + json = json.query(jsonPointer.get()) + } + body = json.toString() + } + response.status(200).send(body) } } } @@ -124,6 +136,7 @@ class LegacyAWS1ClientForkedTest extends AgentTestRunner { def "send #operation request with mocked response"() { setup: responseBody.set(body) + jsonPointer.set(jsonPointerStr) when: def response = call.call(client) @@ -187,18 +200,21 @@ class LegacyAWS1ClientForkedTest extends AgentTestRunner { server.lastRequest.headers.get("x-datadog-trace-id") == null server.lastRequest.headers.get("x-datadog-parent-id") == null + cleanup: + jsonPointer.set(null) + where: - service | operation | ddService | method | path | client | call | additionalTags | body - "S3" | "CreateBucket" | "java-aws-sdk" | "PUT" | "/testbucket/" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createBucket("testbucket") } | ["aws.bucket.name": "testbucket", "bucketname": "testbucket"] | "" - "S3" | "GetObject" | "java-aws-sdk" | "GET" | "/someBucket/someKey" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.getObject("someBucket", "someKey") } | ["aws.bucket.name": "someBucket", "bucketname": "someBucket"] | "" - "DynamoDBv2" | "CreateTable" | "java-aws-sdk" | "POST" | "/" | AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createTable(new CreateTableRequest("sometable", null)) } | ["aws.table.name": "sometable", "tablename": "sometable"] | "" - "Kinesis" | "DeleteStream" | "java-aws-sdk" | "POST" | "/" | AmazonKinesisClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteStream(new DeleteStreamRequest().withStreamName("somestream")) } | ["aws.stream.name": "somestream", "streamname": "somestream"] | "" + service | operation | ddService | method | path | client | call | additionalTags | body | jsonPointerStr + "S3" | "CreateBucket" | "java-aws-sdk" | "PUT" | "/testbucket/" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createBucket("testbucket") } | ["aws.bucket.name": "testbucket", "bucketname": "testbucket"] | "" | null + "S3" | "GetObject" | "java-aws-sdk" | "GET" | "/someBucket/someKey" | AmazonS3ClientBuilder.standard().withPathStyleAccessEnabled(true).withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.getObject("someBucket", "someKey") } | ["aws.bucket.name": "someBucket", "bucketname": "someBucket"] | "" | null + "DynamoDBv2" | "CreateTable" | "java-aws-sdk" | "POST" | "/" | AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createTable(new CreateTableRequest("sometable", null)) } | ["aws.table.name": "sometable", "tablename": "sometable"] | "" | null + "Kinesis" | "DeleteStream" | "java-aws-sdk" | "POST" | "/" | AmazonKinesisClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteStream(new DeleteStreamRequest().withStreamName("somestream")) } | ["aws.stream.name": "somestream", "streamname": "somestream"] | "" | null "SQS" | "CreateQueue" | "java-aws-sdk" | "POST" | "/" | AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.createQueue(new CreateQueueRequest("somequeue")) } | ["aws.queue.name": "somequeue", "queuename": "somequeue"] | """ https://queue.amazonaws.com/123456789012/MyQueue 7a62c49f-347e-4fc4-9331-6e8e7a96aa73 - """ + """ | "/CreateQueueResponse/CreateQueueResult" "SQS" | "SendMessage" | "sqs" | "POST" | "/someurl" | AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.sendMessage(new SendMessageRequest("someurl", "")) } | ["aws.queue.url": "someurl"] | """ @@ -208,7 +224,7 @@ class LegacyAWS1ClientForkedTest extends AgentTestRunner { 27daac76-34dd-47df-bd01-1f6e873584a0 - """ + """ | "/SendMessageResponse/SendMessageResult" "SNS" | "Publish" | "sns" | "POST" | "/" | AmazonSNSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.publish(new PublishRequest("arn:aws:sns::123:some-topic", "")) } | ["aws.topic.name": "some-topic", "topicname": "some-topic"] | """ @@ -216,21 +232,21 @@ class LegacyAWS1ClientForkedTest extends AgentTestRunner { d74b8436-ae13-5ab4-a9ff-ce54dfea72a0 - """ + """ | "/PublishResponse/PublishResult" "EC2" | "AllocateAddress" | "java-aws-sdk" | "POST" | "/" | AmazonEC2ClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.allocateAddress() } | [:] | """ 59dbff89-35bd-4eac-99ed-be587EXAMPLE 192.0.2.1 standard - """ + """ | null "RDS" | "DeleteOptionGroup" | "java-aws-sdk" | "POST" | "/" | AmazonRDSClientBuilder.standard().withEndpointConfiguration(endpoint).withCredentials(credentialsProvider).build() | { c -> c.deleteOptionGroup(new DeleteOptionGroupRequest()) } | [:] | """ 0ac9cda2-bbf4-11d3-f92b-31fa5e8dbc99 - """ + """ | null } def "send #operation request to closed port"() { diff --git a/dd-java-agent/instrumentation/aws-java-sqs-1.0/build.gradle b/dd-java-agent/instrumentation/aws-java-sqs-1.0/build.gradle index 3f9a4eca2cf..e979e34e7fd 100644 --- a/dd-java-agent/instrumentation/aws-java-sqs-1.0/build.gradle +++ b/dd-java-agent/instrumentation/aws-java-sqs-1.0/build.gradle @@ -12,6 +12,7 @@ muzzle { apply from: "$rootDir/gradle/java.gradle" addTestSuiteForDir('latestDepTest', 'test') +addTestSuiteExtendingForDir('latestDepForkedTest', 'latestDepTest', 'test') dependencies { compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-sqs', version: '1.11.0' @@ -23,7 +24,7 @@ dependencies { testImplementation project(':dd-java-agent:instrumentation:jms') // SQS<->JMS testing: - testImplementation group: 'org.elasticmq', name: 'elasticmq-rest-sqs_2.13', version: '1.2.3' + testImplementation group: 'org.elasticmq', name: 'elasticmq-rest-sqs_2.13', version: '1.4.7' testImplementation group: 'com.amazonaws', name: 'amazon-sqs-java-messaging-lib', version: '1.0.8' latestDepTestImplementation group: 'com.amazonaws', name: 'aws-java-sdk-sqs', version: '+' diff --git a/dd-java-agent/instrumentation/aws-java-sqs-2.0/build.gradle b/dd-java-agent/instrumentation/aws-java-sqs-2.0/build.gradle index a292ea34a70..adff4418500 100644 --- a/dd-java-agent/instrumentation/aws-java-sqs-2.0/build.gradle +++ b/dd-java-agent/instrumentation/aws-java-sqs-2.0/build.gradle @@ -13,6 +13,8 @@ muzzle { apply from: "$rootDir/gradle/java.gradle" addTestSuiteForDir('latestDepTest', 'test') +addTestSuiteExtendingForDir('latestDepForkedTest', 'latestDepTest', 'test') + dependencies { compileOnly group: 'software.amazon.awssdk', name: 'sqs', version: '2.2.0' @@ -24,7 +26,7 @@ dependencies { testImplementation project(':dd-java-agent:instrumentation:jms') // SQS<->JMS testing: - testImplementation group: 'org.elasticmq', name: 'elasticmq-rest-sqs_2.13', version: '1.2.3' + testImplementation group: 'org.elasticmq', name: 'elasticmq-rest-sqs_2.13', version: '1.4.7' testImplementation group: 'com.amazonaws', name: 'amazon-sqs-java-messaging-lib', version: '2.0.0' latestDepTestImplementation group: 'software.amazon.awssdk', name: 'sqs', version: '2.20.33' diff --git a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/LegacySqsClientForkedTest.groovy b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/LegacySqsClientForkedTest.groovy index d2692a61d0c..84ad8f22268 100644 --- a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/LegacySqsClientForkedTest.groovy +++ b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/LegacySqsClientForkedTest.groovy @@ -94,7 +94,7 @@ class LegacySqsClientForkedTest extends AgentTestRunner { "aws.operation" "SendMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } @@ -140,7 +140,7 @@ class LegacySqsClientForkedTest extends AgentTestRunner { "aws.operation" "ReceiveMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } @@ -222,7 +222,7 @@ class LegacySqsClientForkedTest extends AgentTestRunner { "aws.operation" "SendMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } @@ -285,7 +285,7 @@ class LegacySqsClientForkedTest extends AgentTestRunner { "aws.operation" "DeleteMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } @@ -330,7 +330,7 @@ class LegacySqsClientForkedTest extends AgentTestRunner { "aws.operation" "ReceiveMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } diff --git a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/SqsClientTest.groovy b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/SqsClientTest.groovy index 05b5b5a0971..ad1219478f5 100644 --- a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/SqsClientTest.groovy +++ b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/SqsClientTest.groovy @@ -394,7 +394,7 @@ abstract class SqsClientTest extends VersionedNamingTestBase { "aws.operation" "DeleteMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } diff --git a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/TimeInQueueForkedTest.groovy b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/TimeInQueueForkedTest.groovy index 7c864453979..b19b99c0c82 100644 --- a/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/TimeInQueueForkedTest.groovy +++ b/dd-java-agent/instrumentation/aws-java-sqs-2.0/src/test/groovy/TimeInQueueForkedTest.groovy @@ -302,7 +302,7 @@ class TimeInQueueForkedTest extends AgentTestRunner { "aws.operation" "SendMessageBatch" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags() } } @@ -325,7 +325,7 @@ class TimeInQueueForkedTest extends AgentTestRunner { "aws.operation" "ReceiveMessage" "aws.agent" "java-aws-sdk" "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags(parent.resourceName as String == "Sqs.SendMessageBatch") } } @@ -344,7 +344,7 @@ class TimeInQueueForkedTest extends AgentTestRunner { "$Tags.COMPONENT" "java-aws-sdk" "$Tags.SPAN_KIND" Tags.SPAN_KIND_BROKER "aws.queue.url" "http://localhost:${address.port}/000000000000/somequeue" - "aws.requestId" "00000000-0000-0000-0000-000000000000" + "aws.requestId" { it.trim() == "00000000-0000-0000-0000-000000000000" } // the test server seem messing with request id and insert \n defaultTags(true) } } diff --git a/dd-java-agent/instrumentation/build.gradle b/dd-java-agent/instrumentation/build.gradle index 3847c8b9dd0..1d22aba7ebe 100644 --- a/dd-java-agent/instrumentation/build.gradle +++ b/dd-java-agent/instrumentation/build.gradle @@ -99,7 +99,7 @@ subprojects { Project subProj -> onlyIf { !project.rootProject.hasProperty("skipInstTests") } - if (subTask.name == 'latestDepTest') { + if (subTask.name in ['latestDepTest', 'latestDepForkedTest']) { subTask.jvmArgs '-Dtest.dd.latestDepTest=true' } }