Skip to content

Commit 5aaa71a

Browse files
AlexeyKuznetsov-DDPerfectSlayer
authored andcommitted
Reproducer for Virtual Thread issues
1 parent 92b8b82 commit 5aaa71a

5 files changed

Lines changed: 98 additions & 99 deletions

File tree

.gitlab-ci.yml

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ variables:
3232
BUILDER_IMAGE_REPO: "registry.ddbuild.io/images/mirror/dd-trace-java-docker-build" # images are pinned in images/mirror.lock.yaml in the DataDog/images repo
3333
BUILDER_IMAGE_VERSION_PREFIX: "ci-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "ci-" or "123_merge-")
3434
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
35-
DEFAULT_TEST_JVMS: /^(8|11|17|21|25|tip)$/ # the latest "tip" version is 26
35+
DEFAULT_TEST_JVMS: /^(21)$/ # the latest "tip" version is 26
3636
PROFILE_TESTS:
3737
description: "Enable profiling of tests"
3838
value: "false"
@@ -475,17 +475,17 @@ check_build_src:
475475
variables:
476476
GRADLE_TARGET: ":buildSrc:build"
477477

478-
check_base:
479-
extends: .check_job
480-
variables:
481-
GRADLE_TARGET: ":baseCheck"
482-
483-
check_inst:
484-
extends: .check_job
485-
parallel: 4
486-
variables:
487-
GRADLE_TARGET: ":instrumentationCheck"
488-
CACHE_TYPE: "inst"
478+
# check_base:
479+
# extends: .check_job
480+
# variables:
481+
# GRADLE_TARGET: ":baseCheck"
482+
#
483+
# check_inst:
484+
# extends: .check_job
485+
# parallel: 4
486+
# variables:
487+
# GRADLE_TARGET: ":instrumentationCheck"
488+
# CACHE_TYPE: "inst"
489489

490490
check_smoke:
491491
extends: .check_job
@@ -504,57 +504,57 @@ check_debugger:
504504
variables:
505505
GRADLE_TARGET: ":debuggerCheck"
506506

507-
muzzle:
508-
extends: .gradle_build
509-
needs: [ build_tests ]
510-
stage: tests
511-
parallel:
512-
matrix:
513-
- CI_SPLIT: ["1/8", "2/8", "3/8", "4/8", "5/8", "6/8", "7/8", "8/8"]
514-
variables:
515-
CACHE_TYPE: "inst"
516-
script:
517-
- export SKIP_BUILDSCAN="true"
518-
- ./gradlew --version
519-
- ./gradlew :runMuzzle -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
520-
after_script:
521-
- *container_info
522-
- *cgroup_info
523-
- *set_datadog_api_keys
524-
- source .gitlab/gitlab-utils.sh
525-
- gitlab_section_start "collect-reports" "Collecting reports"
526-
- .gitlab/collect_reports.sh
527-
- .gitlab/collect_results.sh
528-
- .gitlab/upload_ciapp.sh $CACHE_TYPE
529-
- gitlab_section_end "collect-reports"
530-
artifacts:
531-
when: always
532-
paths:
533-
- ./reports
534-
- ./results
535-
- '.gradle/daemon/*/*.out.log'
536-
reports:
537-
junit: results/*.xml
538-
539-
muzzle-dep-report:
540-
extends: .gradle_build
541-
needs: [ build_tests ]
542-
stage: tests
543-
variables:
544-
CACHE_TYPE: "inst"
545-
script:
546-
- export SKIP_BUILDSCAN="true"
547-
- ./gradlew --version
548-
- ./gradlew generateMuzzleReport muzzleInstrumentationReport $GRADLE_ARGS
549-
after_script:
550-
- *container_info
551-
- *cgroup_info
552-
- .gitlab/collect_muzzle_deps.sh
553-
artifacts:
554-
when: always
555-
paths:
556-
- ./reports
557-
- '.gradle/daemon/*/*.out.log'
507+
# muzzle:
508+
# extends: .gradle_build
509+
# needs: [ build_tests ]
510+
# stage: tests
511+
# parallel:
512+
# matrix:
513+
# - CI_SPLIT: ["1/8", "2/8", "3/8", "4/8", "5/8", "6/8", "7/8", "8/8"]
514+
# variables:
515+
# CACHE_TYPE: "inst"
516+
# script:
517+
# - export SKIP_BUILDSCAN="true"
518+
# - ./gradlew --version
519+
# - ./gradlew :runMuzzle -Pslot=$CI_NODE_INDEX/$CI_NODE_TOTAL $GRADLE_ARGS
520+
# after_script:
521+
# - *container_info
522+
# - *cgroup_info
523+
# - *set_datadog_api_keys
524+
# - source .gitlab/gitlab-utils.sh
525+
# - gitlab_section_start "collect-reports" "Collecting reports"
526+
# - .gitlab/collect_reports.sh
527+
# - .gitlab/collect_results.sh
528+
# - .gitlab/upload_ciapp.sh $CACHE_TYPE
529+
# - gitlab_section_end "collect-reports"
530+
# artifacts:
531+
# when: always
532+
# paths:
533+
# - ./reports
534+
# - ./results
535+
# - '.gradle/daemon/*/*.out.log'
536+
# reports:
537+
# junit: results/*.xml
538+
#
539+
# muzzle-dep-report:
540+
# extends: .gradle_build
541+
# needs: [ build_tests ]
542+
# stage: tests
543+
# variables:
544+
# CACHE_TYPE: "inst"
545+
# script:
546+
# - export SKIP_BUILDSCAN="true"
547+
# - ./gradlew --version
548+
# - ./gradlew generateMuzzleReport muzzleInstrumentationReport $GRADLE_ARGS
549+
# after_script:
550+
# - *container_info
551+
# - *cgroup_info
552+
# - .gitlab/collect_muzzle_deps.sh
553+
# artifacts:
554+
# when: always
555+
# paths:
556+
# - ./reports
557+
# - '.gradle/daemon/*/*.out.log'
558558

559559
# In Gitlab, DD_* variables are set because the build runner is instrumented with Datadog telemetry
560560
# To have a pristine environment for the tests, these variables are saved before the test run and restored afterwards
@@ -677,36 +677,36 @@ agent_integration_tests:
677677
DD_HOSTNAME: "local-agent"
678678
DD_API_KEY: "invalid_key_but_this_is_fine"
679679

680-
test_base:
681-
extends: .test_job
682-
variables:
683-
GRADLE_TARGET: ":baseTest"
684-
CACHE_TYPE: "base"
685-
parallel:
686-
matrix: *test_matrix_4
687-
script:
688-
- if [ "$testJvm" == "8" ]; then export GRADLE_PARAMS="-PskipFlakyTests -PcheckCoverage"; fi
689-
- !reference [.test_job, script]
690-
691-
test_inst:
692-
extends: .test_job_with_test_agent
693-
variables:
694-
GRADLE_TARGET: ":instrumentationTest"
695-
CACHE_TYPE: "inst"
696-
parallel:
697-
matrix: *test_matrix_8
698-
699-
test_inst_latest:
700-
extends: .test_job_with_test_agent
701-
variables:
702-
GRADLE_TARGET: ":instrumentationLatestDepTest"
703-
CACHE_TYPE: "latestdep"
704-
parallel:
705-
matrix:
706-
- testJvm: ["8", "17", "21", "25"] # the latest "tip" version is LTS v25
707-
# Gitlab doesn't support "parallel" and "parallel:matrix" at the same time
708-
# This emulates "parallel" by including it in the matrix
709-
CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"]
680+
# test_base:
681+
# extends: .test_job
682+
# variables:
683+
# GRADLE_TARGET: ":baseTest"
684+
# CACHE_TYPE: "base"
685+
# parallel:
686+
# matrix: *test_matrix_4
687+
# script:
688+
# - if [ "$testJvm" == "8" ]; then export GRADLE_PARAMS="-PskipFlakyTests -PcheckCoverage"; fi
689+
# - !reference [.test_job, script]
690+
#
691+
# test_inst:
692+
# extends: .test_job_with_test_agent
693+
# variables:
694+
# GRADLE_TARGET: ":instrumentationTest"
695+
# CACHE_TYPE: "inst"
696+
# parallel:
697+
# matrix: *test_matrix_8
698+
#
699+
# test_inst_latest:
700+
# extends: .test_job_with_test_agent
701+
# variables:
702+
# GRADLE_TARGET: ":instrumentationLatestDepTest"
703+
# CACHE_TYPE: "latestdep"
704+
# parallel:
705+
# matrix:
706+
# - testJvm: ["8", "17", "21", "25"] # the latest "tip" version is LTS v25
707+
# # Gitlab doesn't support "parallel" and "parallel:matrix" at the same time
708+
# # This emulates "parallel" by including it in the matrix
709+
# CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"]
710710

711711
test_flaky:
712712
extends: .test_job_with_test_agent

buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ tasks.withType<Test>().configureEach {
5959
}
6060

6161
// Set test timeout for 20 minutes. Default job timeout is 1h (configured on CI level).
62-
timeout.set(Duration.of(20, ChronoUnit.MINUTES))
62+
timeout.set(Duration.of(10, ChronoUnit.MINUTES))
6363
}
6464

6565
// Register a task "allTests" that depends on all non-latest and non-traceAgentTest Test tasks.

dd-smoke-tests/concurrent/java-21/src/test/groovy/datadog/smoketest/concurrent/AbstractConcurrentTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract class AbstractConcurrentTest extends AbstractSmokeTest {
6565
}
6666

6767
protected void receivedCorrectTrace() {
68-
waitForTrace(defaultPoll, checkTrace())
68+
waitForTrace(hangedPoll, checkTrace())
6969
assert traceCount.get() == 1
7070
assert testedProcess.waitFor(TIMEOUT_SECS, SECONDS)
7171
assert testedProcess.exitValue() == 0

dd-smoke-tests/concurrent/java-21/src/test/groovy/datadog/smoketest/concurrent/VirtualThreadTest.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
package datadog.smoketest.concurrent
22

3-
import datadog.trace.test.util.Flaky
4-
53
class VirtualThreadStartTest extends AbstractConcurrentTest {
64
@Override
75
protected List<String> getTestArguments() {
86
return ['virtualThreadStart']
97
}
108

11-
@Flaky("Sometimes fails on CI with: Condition not satisfied after 30.00 seconds and 31 attempts")
129
def 'test Thread.startVirtualThread() runnable'() {
1310
expect:
1411
receivedCorrectTrace()
@@ -57,7 +54,6 @@ class VirtualThreadSubmitRunnableTest extends AbstractConcurrentTest {
5754
return ['virtualThreadSubmitRunnable']
5855
}
5956

60-
@Flaky("Sometimes fails on CI with: Condition not satisfied after 30.00 seconds and 31 attempts")
6157
def 'test VirtualThread submit runnable'() {
6258
expect:
6359
receivedCorrectTrace()

dd-smoke-tests/src/main/groovy/datadog/smoketest/AbstractSmokeTest.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ abstract class AbstractSmokeTest extends ProcessManager {
6868
@Shared
6969
protected final PollingConditions defaultPoll = new PollingConditions(timeout: 30, initialDelay: 0, delay: 1, factor: 1)
7070

71+
@Shared
72+
protected final PollingConditions hangedPoll = new PollingConditions(timeout: 700, initialDelay: 0, delay: 5, factor: 2)
73+
7174
@Shared
7275
@AutoCleanup
7376
protected TestHttpServer server = httpServer {

0 commit comments

Comments
 (0)