URL:
https://github.com/SSSD/sssd/pull/947
Title: #947: tests: fix race conditions in integration tests
alexey-tikhonov commented:
"""
about the race between adding e.g. the user to /etc/passwd and
getting inotify processed.
Isn't this similar to why calling `sss_cache` was added `useradd` and other utilities
from the shadow-utils package? Have you tried if instead of increasing the delay calling
`sss_cache -E` would work as well?
If I understand correctly `sss_cache` will reset mem-cache and re-write timestamps in
sysdb cache but that's not enough because files_provider ignores timestamps in sysdb
cache. So if inotify event have not been processed yet then files_provider still will
return stale data from sysdb cache. I wrote [about
it](https://bugzilla.redhat.com/show_bug.cgi?id=1693379#c6) (item 2) )
I think whenever a cache is added in between this use case can only
be covered if the cache is explicitly invalidated after adding the new line
This is true in the limits of current design of files_provider.
But the problem is there are no "ready" means to invalidate sysdb cache for
files_provider as it ignores timestamp (again, if I understand correctly)
To this extent I agree with @pbrezina that if case is expected to test current design then
`sleep` is ok.
"""
See the full comment at
https://github.com/SSSD/sssd/pull/947#issuecomment-561645860