Skip to content

Commit

Permalink
Make outgoing_pools a list
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Feb 28, 2024
1 parent ab1f5c9 commit 99ac9e0
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 134 deletions.
48 changes: 32 additions & 16 deletions big_tests/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
{internal_mnesia,
%% dbs variable is used by ./tools/test_runner/presets_to_dbs.sh script
[{dbs, [redis, minio]},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10"}]},
{pgsql_cets,
Expand All @@ -250,10 +251,12 @@
{auth_method, "rdbms"},
{internal_databases, "[internal_databases.cets]
cluster_name = \"{{cluster_name}}\""},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.rdbms.default]
[[outgoing_pools.rdbms]]
tag = \"default\"
scope = \"global\"
workers = 5
connection.driver = \"pgsql\"
Expand All @@ -271,10 +274,12 @@
{pgsql_mnesia,
[{dbs, [redis, pgsql]},
{auth_method, "rdbms"},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.rdbms.default]
[[outgoing_pools.rdbms]]
tag = \"default\"
scope = \"global\"
workers = 5
connection.driver = \"pgsql\"
Expand All @@ -293,10 +298,12 @@
[{dbs, [redis, mssql]},
{auth_method, "rdbms"},
{rdbms_server_type, "\"mssql\""},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.rdbms.default]
[[outgoing_pools.rdbms]]
tag = \"default\"
scope = \"global\"
workers = 5
connection.driver = \"odbc\"
Expand All @@ -309,14 +316,17 @@
[{dbs, [redis, mysql, rmq]},
{sm_backend, "\"redis\""},
{auth_method, "rdbms"},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.redis.default]
[[outgoing_pools.redis]]
tag = \"default\"
scope = \"global\"
workers = 10
strategy = \"random_worker\"
[outgoing_pools.rdbms.default]
[[outgoing_pools.rdbms]]
tag = \"default\"
scope = \"global\"
workers = 5
connection.driver = \"mysql\"
Expand All @@ -333,10 +343,12 @@
{ldap_mnesia,
[{dbs, [redis, ldap]},
{auth_method, "ldap"},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.ldap.default]
[[outgoing_pools.ldap]]
tag = \"default\"
scope = \"global\"
workers = 5
connection.port = 3636
Expand All @@ -346,7 +358,8 @@
connection.tls.cacertfile = \"priv/ssl/cacert.pem\"
connection.tls.certfile = \"priv/ssl/fake_cert.pem\"
connection.tls.keyfile = \"priv/ssl/fake_key.pem\"
[outgoing_pools.ldap.bind]
[[outgoing_pools.ldap]]
tag = \"bind\"
scope = \"global\"
workers = 5
connection.port = 3636
Expand All @@ -363,15 +376,18 @@
ldap.filter = \"(objectClass=inetOrgPerson)\"\n"}]},
{elasticsearch_and_cassandra_mnesia,
[{dbs, [redis, elasticsearch, cassandra]},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
{outgoing_pools, "[[outgoing_pools.redis]]
tag = \"global_distrib\"
scope = \"global\"
workers = 10
[outgoing_pools.cassandra.default]
[[outgoing_pools.cassandra]]
tag = \"default\"
scope = \"global\"
workers = 20
connection.servers = [{host = \"localhost\", port = 9142}]
connection.tls.cacertfile = \"priv/ssl/cacert.pem\"
[outgoing_pools.elastic.default]
[[outgoing_pools.elastic]]
tag = \"default\"
scope = \"global\""}
]}
]}
Expand Down
2 changes: 1 addition & 1 deletion big_tests/tests/push_integration_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ init_per_suite(Config) ->
PoolOpts = #{strategy => available_worker, workers => 20},
ConnOpts = #{host => "https://localhost:" ++ integer_to_list(Port), request_timeout => 2000,
tls => #{verify_mode => none}},
Pool = config([outgoing_pools, http, mongoose_push_http], #{opts => PoolOpts, conn_opts => ConnOpts}),
Pool = config([outgoing_pools, http], #{tag => mongoose_push_http, opts => PoolOpts, conn_opts => ConnOpts}),
[{ok, _Pid}] = rpc(?RPC_SPEC, mongoose_wpool, start_configured_pools, [[Pool]]),
ConfigWithModules = dynamic_modules:save_modules(domain(), Config),
escalus:init_per_suite(ConfigWithModules).
Expand Down
4 changes: 2 additions & 2 deletions big_tests/tests/push_pubsub_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ init_per_testcase(CaseName, Config) ->
PoolOpts = #{strategy => available_worker, workers => 20},
ConnOpts = #{host => "http://localhost:" ++ integer_to_list(MongoosePushMockPort),
request_timeout => 2000},
Pool = config([outgoing_pools, http, mongoose_push_http],
#{opts => PoolOpts, conn_opts => ConnOpts}),
Pool = config([outgoing_pools, http],
#{tag => mongoose_push_http, opts => PoolOpts, conn_opts => ConnOpts}),
[{ok, _Pid}] = rpc(mongoose_wpool, start_configured_pools, [[Pool]]),
escalus:init_per_testcase(CaseName, Config).

Expand Down
Loading

0 comments on commit 99ac9e0

Please sign in to comment.