Skip to content

Commit 119f529

Browse files
Another attempt.
1 parent cb5002a commit 119f529

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.gitlab/collect_reports.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function process_reports () {
6262
cp -r workspace/$project_to_save/build/reports/* $report_path/ 2>/dev/null || true
6363
cp workspace/$project_to_save/build/hs_err_pid*.log $report_path/ 2>/dev/null || true
6464
cp workspace/$project_to_save/build/javacore*.txt $report_path/ 2>/dev/null || true
65+
cp workspace/$project_to_save/build/thread-dump-*.log $report_path/ 2>/dev/null || true
6566
fi
6667
}
6768

dd-java-agent/instrumentation/java-concurrent/java-concurrent-21/src/previewTest/groovy/StructuredConcurrencyTest.groovy

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ class StructuredConcurrencyTest extends AgentTestRunner {
1919
def setup() {
2020
scheduler = Executors.newSingleThreadScheduledExecutor()
2121

22-
threadDumpTask = scheduler.schedule({
23-
File reportDir = new File("build/reports")
22+
threadDumpTask = scheduler.scheduleAtFixedRate({
23+
File reportDir = new File("build")
2424

2525
// Ensure the directory exists
2626
if (!reportDir.exists()) {
27-
reportDir.mkdirs()
27+
println("build folder not found")
28+
return
2829
}
2930

3031
// Define the file path
@@ -39,7 +40,7 @@ class StructuredConcurrencyTest extends AgentTestRunner {
3940
}
4041
writer.write("==============================================\n")
4142
}
42-
}, 1, TimeUnit.MILLISECONDS)
43+
}, 10, 60_000, TimeUnit.MILLISECONDS)
4344
}
4445

4546
def cleanup() {

dd-java-agent/instrumentation/lettuce-4/src/test/groovy/Lettuce4ClientTestBase.groovy

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ abstract class Lettuce4ClientTestBase extends VersionedNamingTestBase {
7171
def setup() {
7272
scheduler = Executors.newSingleThreadScheduledExecutor()
7373

74-
threadDumpTask = scheduler.schedule({
75-
File reportDir = new File("build/reports")
74+
threadDumpTask = scheduler.scheduleAtFixedRate({
75+
File reportDir = new File("build")
7676

7777
// Ensure the directory exists
7878
if (!reportDir.exists()) {
79-
reportDir.mkdirs()
79+
println("build folder not found")
80+
return
8081
}
8182

8283
// Define the file path
@@ -91,7 +92,7 @@ abstract class Lettuce4ClientTestBase extends VersionedNamingTestBase {
9192
}
9293
writer.write("==============================================\n")
9394
}
94-
}, 1, TimeUnit.MILLISECONDS)
95+
}, 10, 60_000, TimeUnit.MILLISECONDS)
9596

9697
redisServer.start()
9798

0 commit comments

Comments
 (0)