ldap test env: allow configuration of wait_for_ldap()

This commit is contained in:
Timothée Floure 2021-01-13 08:37:55 +01:00
parent 7168f65965
commit c003b82736
Signed by: tfloure
GPG Key ID: 4502C902C00A1E12
1 changed files with 6 additions and 1 deletions

View File

@ -47,7 +47,12 @@ defmodule RecycledCloud.LDAPTestEnvironment do
[:binary, args: args]
)
case wait_for_ldap() do
max_loop_count = case System.get_env("LDAP_WAIT_LOOPS") do
nil -> 10
str -> str |> String.to_integer
end
case wait_for_ldap(1000, max_loop_count) do
:ok ->
# Wait for LDAP server to be populated.
# FIXME: poll state instead of taking a nap!