tests: runtime: in_tcp: added check for connection failure to prevent
a segfault when the connection fails which
pollutes the underlying cause.
@@ -330,17 +330,20 @@ void flb_test_tcp_with_tls()
TEST_CHECK(client_connection != NULL);
+ if (client_connection != NULL) {
ret = flb_io_net_write(client_connection,
(void *) buf,
size,
&sent);
- TEST_CHECK(ret == 0);
+ TEST_CHECK(ret > 0);
/* waiting to flush */
flb_time_msleep(1500);
+ }
num = get_output_num();
+
if (!TEST_CHECK(num > 0)) {
TEST_MSG("no outputs");
}
