Skip to content

Commit ee09f62

Browse files
committed
tests: internal: router_config: fix test assertions
This patch fixes test assertions and improves test reliability. Signed-off-by: Eduardo Silva <[email protected]>
1 parent e97f611 commit ee09f62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/internal/router_config.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,7 @@ static void test_router_condition_eval_logs_otel_contexts()
15981598
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_TRUE);
15991599
}
16001600
flb_router_chunk_context_reset(&context);
1601+
msgpack_sbuffer_destroy(&encoder.buffer);
16011602
flb_log_event_encoder_destroy(&encoder);
16021603

16031604
ret = build_log_chunk_with_otel("api", "demo", "1.0.0",
@@ -1608,6 +1609,7 @@ static void test_router_condition_eval_logs_otel_contexts()
16081609
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_FALSE);
16091610
}
16101611
flb_router_chunk_context_reset(&context);
1612+
msgpack_sbuffer_destroy(&encoder.buffer);
16111613
flb_log_event_encoder_destroy(&encoder);
16121614

16131615
free_route_condition(condition);
@@ -1673,6 +1675,7 @@ static void test_router_condition_eval_logs_otel_contexts()
16731675
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_TRUE);
16741676
}
16751677
flb_router_chunk_context_reset(&context);
1678+
msgpack_sbuffer_destroy(&encoder.buffer);
16761679
flb_log_event_encoder_destroy(&encoder);
16771680

16781681
ret = build_log_chunk_with_otel("backend", "other", "1.0.0",
@@ -1683,6 +1686,7 @@ static void test_router_condition_eval_logs_otel_contexts()
16831686
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_FALSE);
16841687
}
16851688
flb_router_chunk_context_reset(&context);
1689+
msgpack_sbuffer_destroy(&encoder.buffer);
16861690
flb_log_event_encoder_destroy(&encoder);
16871691

16881692
free_route_condition(condition);
@@ -1748,6 +1752,7 @@ static void test_router_condition_eval_logs_otel_contexts()
17481752
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_TRUE);
17491753
}
17501754
flb_router_chunk_context_reset(&context);
1755+
msgpack_sbuffer_destroy(&encoder.buffer);
17511756
flb_log_event_encoder_destroy(&encoder);
17521757

17531758
ret = build_log_chunk_with_otel("backend", "demo", "1.0.0",
@@ -1758,6 +1763,7 @@ static void test_router_condition_eval_logs_otel_contexts()
17581763
TEST_CHECK(flb_condition_eval_logs(&chunk, &context, &route) == FLB_FALSE);
17591764
}
17601765
flb_router_chunk_context_reset(&context);
1766+
msgpack_sbuffer_destroy(&encoder.buffer);
17611767
flb_log_event_encoder_destroy(&encoder);
17621768

17631769
free_route_condition(condition);

0 commit comments

Comments
 (0)