@@ -24,12 +24,9 @@ public class CustomInstrumentationTest extends AiSmokeTest {
2424
2525 @ Test
2626 @ TargetUri ("/customInstrumentationOne" )
27- public void customInstrumentationOne () {
28- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
29- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
30-
31- assertThat (rdList , hasSize (1 ));
32- assertThat (rddList , hasSize (1 ));
27+ public void customInstrumentationOne () throws Exception {
28+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
29+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 1 );
3330
3431 Envelope rdEnvelope = rdList .get (0 );
3532 Envelope rddEnvelope = rddList .get (0 );
@@ -47,12 +44,9 @@ public void customInstrumentationOne() {
4744
4845 @ Test
4946 @ TargetUri ("/customInstrumentationTwo" )
50- public void customInstrumentationTwo () {
51- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
52- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
53-
54- assertThat (rdList , hasSize (1 ));
55- assertThat (rddList , hasSize (1 ));
47+ public void customInstrumentationTwo () throws Exception {
48+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
49+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 1 );
5650
5751 Envelope rdEnvelope = rdList .get (0 );
5852 Envelope rddEnvelope = rddList .get (0 );
@@ -70,14 +64,10 @@ public void customInstrumentationTwo() {
7064
7165 @ Test
7266 @ TargetUri ("/customInstrumentationThree" )
73- public void customInstrumentationThree () {
74- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
75- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
76- List <Envelope > edList = mockedIngestion .getItemsEnvelopeDataType ("ExceptionData" );
77-
78- assertThat (rdList , hasSize (1 ));
79- assertThat (rddList , hasSize (1 ));
80- assertThat (edList , hasSize (1 ));
67+ public void customInstrumentationThree () throws Exception {
68+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
69+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 1 );
70+ List <Envelope > edList = mockedIngestion .waitForItems ("ExceptionData" , 1 );
8171
8272 Envelope rdEnvelope = rdList .get (0 );
8373 Envelope rddEnvelope = rddList .get (0 );
@@ -102,12 +92,9 @@ public void customInstrumentationThree() {
10292
10393 @ Test
10494 @ TargetUri ("/customInstrumentationFour" )
105- public void customInstrumentationFour () {
106- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
107- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
108-
109- assertThat (rdList , hasSize (1 ));
110- assertThat (rddList , hasSize (1 ));
95+ public void customInstrumentationFour () throws Exception {
96+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
97+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 1 );
11198
11299 Envelope rdEnvelope = rdList .get (0 );
113100 Envelope rddEnvelope = rddList .get (0 );
@@ -125,14 +112,13 @@ public void customInstrumentationFour() {
125112
126113 @ Test
127114 @ TargetUri ("/customInstrumentationFive" )
128- public void customInstrumentationFive () {
129- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
130- assertThat (rdList , hasSize (1 ));
115+ public void customInstrumentationFive () throws Exception {
116+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
117+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 4 );
118+
131119 Envelope rdEnvelope = rdList .get (0 );
132120 RequestData rd = (RequestData ) ((Data ) rdEnvelope .getData ()).getBaseData ();
133121
134- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
135- assertThat (rddList , hasSize (4 ));
136122 Envelope fiveEnvelope = null ;
137123 Envelope sixEnvelope = null ;
138124 Envelope oneEnvelope = null ;
@@ -189,12 +175,9 @@ public void customInstrumentationFive() {
189175
190176 @ Test
191177 @ TargetUri ("/customInstrumentationSeven" )
192- public void customInstrumentationSeven () {
193- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
194- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
195-
196- assertThat (rdList , hasSize (1 ));
197- assertThat (rddList , hasSize (1 ));
178+ public void customInstrumentationSeven () throws Exception {
179+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
180+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 1 );
198181
199182 Envelope rdEnvelope = rdList .get (0 );
200183 Envelope rddEnvelope = rddList .get (0 );
@@ -211,12 +194,9 @@ public void customInstrumentationSeven() {
211194
212195 @ Test
213196 @ TargetUri ("/customInstrumentationEight" )
214- public void customInstrumentationEight () {
215- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
216- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
217-
218- assertThat (rdList , hasSize (1 ));
219- assertThat (rddList , hasSize (2 ));
197+ public void customInstrumentationEight () throws Exception {
198+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
199+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 2 );
220200
221201 Envelope rdEnvelope = rdList .get (0 );
222202 Envelope rddEnvelope1 = rddList .get (0 );
@@ -241,14 +221,13 @@ public void customInstrumentationEight() {
241221
242222 @ Test
243223 @ TargetUri ("/customInstrumentationNine" )
244- public void customInstrumentationNine () {
245- List <Envelope > rdList = mockedIngestion .getItemsEnvelopeDataType ("RequestData" );
246- assertThat (rdList , hasSize (1 ));
224+ public void customInstrumentationNine () throws Exception {
225+ List <Envelope > rdList = mockedIngestion .waitForItems ("RequestData" , 1 );
226+ List <Envelope > rddList = mockedIngestion .waitForItems ("RemoteDependencyData" , 2 );
227+
247228 Envelope rdEnvelope = rdList .get (0 );
248229 RequestData rd = (RequestData ) ((Data ) rdEnvelope .getData ()).getBaseData ();
249230
250- List <Envelope > rddList = mockedIngestion .getItemsEnvelopeDataType ("RemoteDependencyData" );
251- assertThat (rddList , hasSize (2 ));
252231 Envelope nineEnvelope = null ;
253232 Envelope httpEnvelope = null ;
254233 RemoteDependencyData nineRdd = null ;
0 commit comments