@@ -49,6 +49,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException {
49
49
}
50
50
});
51
51
fluentd .start ();
52
+ fluentd .waitUntilReady ();
52
53
53
54
// start asyncSenders
54
55
Sender asyncSender = new AsyncRawSocketSender ("localhost" , port );
@@ -111,6 +112,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException {
111
112
}
112
113
});
113
114
fluentd .start ();
115
+ fluentd .waitUntilReady ();
114
116
115
117
// start asyncSenders
116
118
Sender asyncSender = new AsyncRawSocketSender ("localhost" , port );
@@ -162,6 +164,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException {
162
164
}
163
165
});
164
166
fluentds [0 ].start ();
167
+ fluentds [0 ].waitUntilReady ();
165
168
ports [1 ] = MockFluentd .randomPort ();
166
169
elists [1 ] = new ArrayList <Event >();
167
170
fluentds [1 ] = new MockFluentd (ports [1 ], new MockFluentd .MockProcess () {
@@ -180,6 +183,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException {
180
183
}
181
184
});
182
185
fluentds [1 ].start ();
186
+ fluentds [1 ].waitUntilReady ();
183
187
184
188
// start AsyncSenders
185
189
Sender [] asyncSenders = new Sender [2 ];
@@ -272,6 +276,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException {
272
276
273
277
MockFluentd fluentd = new MockFluentd (port , mockProcess );
274
278
fluentd .start ();
279
+ fluentd .waitUntilReady ();
275
280
276
281
Sender asyncSender = new AsyncRawSocketSender ("localhost" , port );
277
282
assertFalse (asyncSender .isConnected ());
@@ -369,6 +374,7 @@ public void run() {
369
374
try {
370
375
bufferFull .await (20 , TimeUnit .SECONDS );
371
376
fluentd .start ();
377
+ fluentd .waitUntilReady ();
372
378
} catch (InterruptedException e ) {
373
379
e .printStackTrace ();
374
380
}
0 commit comments