[SSSD] [PATCH] test_memory_cache: Wait short time after cache invalidation
Michal Židek
mzidek at redhat.com
Fri Aug 7 19:19:49 UTC 2015
On 08/07/2015 06:16 AM, Lukas Slebodnik wrote:
>
> +def wait_till_nss_responder_invalidate_cache():
> + # 1 second (200 * 0.005) should be enough time for nss responder
> + for _ in range(1, 200):
> + if os.path.isfile(config.MCACHE_PATH + "/clear_mc_flag"):
> + time.sleep(.005)
> + else:
> + return
> +
> + assert False, "nss responder didn't invalidate memory cache within second"
Grammar nazi nitpick :) : Missing "a" -> within a second
But the nitpick is not relevant due to the following:
I would give it at least 5 seconds for 2 reasons:
a) if it ends sooner nothing happens, everything is fine
b) if it ends later (CI machine under heavy load
makes even this possible) it breaks the test.
Michal
--
Senior Principal Intern
More information about the sssd-devel
mailing list