Skip to content

Commit 8c868b3

Browse files
Proper handling of Target of 'verifyAll' block must not be null error.
1 parent d36f7e7 commit 8c868b3

4 files changed

Lines changed: 119 additions & 46 deletions

File tree

dd-java-agent/instrumentation-testing/src/main/groovy/datadog/trace/agent/test/base/HttpClientTest.groovy

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
203203
}
204204
and:
205205
if (isDataStreamsEnabled()) {
206-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
206+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
207207
it.parentHash == 0
208208
}
209209
verifyAll(first) {
@@ -249,7 +249,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
249249

250250
and:
251251
if (isDataStreamsEnabled()) {
252-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
252+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
253253
it.parentHash == 0
254254
}
255255
verifyAll(first) {
@@ -300,7 +300,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
300300

301301
and:
302302
if (isDataStreamsEnabled()) {
303-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
303+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
304304
it.parentHash == 0
305305
}
306306
verifyAll(first) {
@@ -337,7 +337,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
337337

338338
and:
339339
if (isDataStreamsEnabled()) {
340-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
340+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
341341
it.parentHash == 0
342342
}
343343
verifyAll(first) {
@@ -376,7 +376,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
376376

377377
and:
378378
if (isDataStreamsEnabled()) {
379-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
379+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
380380
it.parentHash == 0
381381
}
382382
verifyAll(first) {
@@ -416,7 +416,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
416416

417417
and:
418418
if (isDataStreamsEnabled()) {
419-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
419+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
420420
it.parentHash == 0
421421
}
422422
verifyAll(first) {
@@ -451,7 +451,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
451451

452452
and:
453453
if (isDataStreamsEnabled()) {
454-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
454+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
455455
it.parentHash == 0
456456
}
457457
verifyAll(first) {
@@ -486,7 +486,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
486486

487487
and:
488488
if (isDataStreamsEnabled()) {
489-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
489+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
490490
it.parentHash == 0
491491
}
492492
verifyAll(first) {
@@ -534,7 +534,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
534534

535535
and:
536536
if (isDataStreamsEnabled()) {
537-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
537+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
538538
it.parentHash == 0
539539
}
540540
verifyAll(first) {
@@ -584,7 +584,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
584584

585585
and:
586586
if (isDataStreamsEnabled()) {
587-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
587+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
588588
it.parentHash == 0
589589
}
590590
verifyAll(first) {
@@ -624,7 +624,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
624624

625625
and:
626626
if (isDataStreamsEnabled()) {
627-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
627+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
628628
it.parentHash == 0
629629
}
630630
verifyAll(first) {
@@ -662,7 +662,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
662662

663663
and:
664664
if (isDataStreamsEnabled()) {
665-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
665+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
666666
it.parentHash == 0
667667
}
668668
verifyAll(first) {
@@ -726,7 +726,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
726726

727727
and:
728728
if (isDataStreamsEnabled()) {
729-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
729+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
730730
it.parentHash == 0
731731
}
732732
verifyAll(first) {
@@ -820,7 +820,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
820820

821821
and:
822822
if (isDataStreamsEnabled()) {
823-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
823+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
824824
it.parentHash == 0
825825
}
826826
verifyAll(first) {
@@ -850,7 +850,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
850850
}
851851
and:
852852
if (isDataStreamsEnabled()) {
853-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
853+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
854854
it.parentHash == 0
855855
}
856856
verifyAll(first) {
@@ -885,7 +885,7 @@ abstract class HttpClientTest extends VersionedNamingTestBase {
885885
}
886886
and:
887887
if (isDataStreamsEnabled()) {
888-
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find {
888+
StatsGroup first = TEST_DATA_STREAMS_WRITER.waitForGroup {
889889
it.parentHash == 0
890890
}
891891
verifyAll(first) {

0 commit comments

Comments
 (0)