Skip to content

Commit f5cd1c6

Browse files
committed
tests: plug memory leaks in events_with_3chunks
Signed-off-by: Jesse Awan <jesse.awan@sap.com>
1 parent 1551ab6 commit f5cd1c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/runtime/in_kubernetes_events.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,10 @@ void flb_test_events_with_3chunks()
660660
TEST_MSG("2 output records are expected found %d", num);
661661
}
662662

663+
/* Stop Fluent Bit before destroying mock server to properly close connections */
664+
flb_stop(ctx->flb);
665+
flb_time_msleep(500); /* Give threads time to shut down */
666+
663667
mock_k8s_api_destroy(k8s_server);
664668
test_ctx_destroy(ctx);
665669
}

0 commit comments

Comments
 (0)