Przeglądaj źródła

Merge pull request #10250 from zmstone/0327-test-fix-flaky-Kafka-consumer-test

test: test with only one Kafka partition for bad config recover test
Zaiming (Stone) Shi 2 lat temu
rodzic
commit
48b5e91d60

+ 12 - 1
lib-ee/emqx_ee_bridge/test/emqx_bridge_impl_kafka_consumer_SUITE.erl

@@ -274,7 +274,18 @@ init_per_testcase(TestCase, Config) when
             [{skip_does_not_apply, true}]
     end;
 init_per_testcase(TestCase, Config) when
-    TestCase =:= t_failed_creation_then_fixed;
+    TestCase =:= t_failed_creation_then_fixed
+->
+    %% test with one partiton only for this case because
+    %% the wait probe may not be always sent to the same partition
+    HasProxy = proplists:get_value(has_proxy, Config, true),
+    case HasProxy of
+        false ->
+            [{skip_does_not_apply, true}];
+        true ->
+            common_init_per_testcase(TestCase, [{num_partitions, 1} | Config])
+    end;
+init_per_testcase(TestCase, Config) when
     TestCase =:= t_on_get_status;
     TestCase =:= t_receive_after_recovery
 ->