Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/runtime/http_client_chunked.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <fluent-bit/flb_socket.h>
#include <fluent-bit/flb_upstream.h>
#include <fluent-bit/flb_engine.h>
#include <fluent-bit/flb_coro.h>
#include <fluent-bit/flb_http_client.h>

#include <monkey/mk_core.h>
Expand Down Expand Up @@ -151,6 +152,7 @@ static void *chunked_server_thread(void *data)
static struct runtime_http_client_ctx *runtime_http_client_ctx_create(int port)
{
struct runtime_http_client_ctx *ctx;
static int coro_initialized = FLB_FALSE;

ctx = flb_calloc(1, sizeof(struct runtime_http_client_ctx));
if (!TEST_CHECK(ctx != NULL)) {
Expand All @@ -167,6 +169,12 @@ static struct runtime_http_client_ctx *runtime_http_client_ctx_create(int port)
flb_engine_evl_init();
flb_engine_evl_set(ctx->evl);

if (coro_initialized == FLB_FALSE) {
flb_coro_init();
coro_initialized = FLB_TRUE;
}
Comment thread
cosmo0920 marked this conversation as resolved.
flb_coro_thread_init();

ctx->config = flb_config_init();
if (!TEST_CHECK(ctx->config != NULL)) {
mk_event_loop_destroy(ctx->evl);
Expand Down
Loading