test: attempting to stabilize more flaky tests

This commit is contained in:
Thales Macedo Garitezi 2023-11-24 17:43:01 -03:00
parent 55a7a4cc7c
commit f2dbddc315
1 changed files with 12 additions and 5 deletions

View File

@ -208,7 +208,7 @@ consumer_config(TestCase, Config) ->
" resource_opts {\n" " resource_opts {\n"
" health_check_interval = \"1s\"\n" " health_check_interval = \"1s\"\n"
%% to fail and retry pulling faster %% to fail and retry pulling faster
" request_ttl = \"5s\"\n" " request_ttl = \"1s\"\n"
" }\n" " }\n"
"}\n", "}\n",
[ [
@ -285,7 +285,7 @@ start_control_client() ->
connect_timeout => 5_000, connect_timeout => 5_000,
max_retries => 0, max_retries => 0,
pool_size => 1, pool_size => 1,
resource_opts => #{request_ttl => 5_000}, resource_opts => #{request_ttl => 1_000},
service_account_json => RawServiceAccount service_account_json => RawServiceAccount
}, },
PoolName = <<"control_connector">>, PoolName = <<"control_connector">>,
@ -1265,11 +1265,12 @@ t_multiple_pull_workers(Config) ->
<<"consumer">> => #{ <<"consumer">> => #{
%% reduce flakiness %% reduce flakiness
<<"ack_deadline">> => <<"10m">>, <<"ack_deadline">> => <<"10m">>,
<<"ack_retry_interval">> => <<"1s">>,
<<"consumer_workers_per_topic">> => NConsumers <<"consumer_workers_per_topic">> => NConsumers
}, },
<<"resource_opts">> => #{ <<"resource_opts">> => #{
%% reduce flakiness %% reduce flakiness
<<"request_ttl">> => <<"15s">> <<"request_ttl">> => <<"4s">>
} }
} }
), ),
@ -1888,7 +1889,10 @@ t_connection_down_during_ack(Config) ->
{{ok, _}, {ok, _}} = {{ok, _}, {ok, _}} =
?wait_async_action( ?wait_async_action(
create_bridge(Config), create_bridge(
Config,
#{<<"consumer">> => #{<<"ack_retry_interval">> => <<"1s">>}}
),
#{?snk_kind := "gcp_pubsub_consumer_worker_subscription_ready"}, #{?snk_kind := "gcp_pubsub_consumer_worker_subscription_ready"},
10_000 10_000
), ),
@ -2026,7 +2030,10 @@ t_connection_down_during_pull(Config) ->
{{ok, _}, {ok, _}} = {{ok, _}, {ok, _}} =
?wait_async_action( ?wait_async_action(
create_bridge(Config), create_bridge(
Config,
#{<<"consumer">> => #{<<"ack_retry_interval">> => <<"1s">>}}
),
#{?snk_kind := "gcp_pubsub_consumer_worker_subscription_ready"}, #{?snk_kind := "gcp_pubsub_consumer_worker_subscription_ready"},
10_000 10_000
), ),