✨ feat(mq): add mq_runtime_defer, default disable
This commit is contained in:
@@ -161,7 +161,7 @@ void test_pub_and_clean_on_msg(int topic_id, void *msg, void *sub_arg)
|
||||
return;
|
||||
}
|
||||
|
||||
TEST(mq_runtime, pub_then_clean) {
|
||||
TEST(mq_runtime, defer_pub_then_clean) {
|
||||
|
||||
struct test_pub_and_clean_env env={};
|
||||
env.s = mq_schema_new();
|
||||
@@ -174,6 +174,8 @@ TEST(mq_runtime, pub_then_clean) {
|
||||
env.rt=mq_runtime_new(env.s);
|
||||
EXPECT_TRUE(env.rt!=NULL);
|
||||
|
||||
mq_runtime_defer(env.rt);
|
||||
|
||||
for(int i=0; i<env.N_round;i++)
|
||||
{
|
||||
env.current_round=i;
|
||||
@@ -370,6 +372,7 @@ TEST(mq_runtime, pub_on_msg_free)
|
||||
env.N_round=10;
|
||||
env.rt=mq_runtime_new(env.s);
|
||||
EXPECT_TRUE(env.rt!=NULL);
|
||||
mq_runtime_defer(env.rt);
|
||||
for(int i=0; i<env.N_round;i++)
|
||||
{
|
||||
env.current_round=i;
|
||||
|
||||
Reference in New Issue
Block a user