diff options
author | Michal Židek <mzidek@redhat.com> | 2015-08-19 20:10:28 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-08-31 17:44:54 +0200 |
commit | f02b62138466c876f6e8d6382769105f2e920d96 (patch) | |
tree | e6b3306965a2126b89cb9fe0303a31186f49a2cd | |
parent | 5e2ffb69dcdd157ea422c6aec256111653e4206b (diff) | |
download | sssd-f02b62138466c876f6e8d6382769105f2e920d96.tar.gz sssd-f02b62138466c876f6e8d6382769105f2e920d96.tar.xz sssd-f02b62138466c876f6e8d6382769105f2e920d96.zip |
TESTS: ldap_id_cleanup timeouts
The one second timeout interval was sometimes
too short when the tests where running under
Valgrind in the CI and the entries expired
too soon.
Reviewed-by: Petr Cech <pcech@redhat.com>
-rw-r--r-- | src/tests/cmocka/test_ldap_id_cleanup.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tests/cmocka/test_ldap_id_cleanup.c b/src/tests/cmocka/test_ldap_id_cleanup.c index 941427e12..ce7f909d5 100644 --- a/src/tests/cmocka/test_ldap_id_cleanup.c +++ b/src/tests/cmocka/test_ldap_id_cleanup.c @@ -186,23 +186,26 @@ static void test_id_cleanup_exp_group(void **state) const char *empty_special_grp = "empty_gr*o/u\\p(2016)"; const char *empty_grp = "empty_grp"; const char *grp = "grp"; + /* This timeout can be bigger because we will call invalidate_group + * to expire entries without waiting. */ + const uint64_t CACHE_TIMEOUT = 30; struct sysdb_test_ctx *test_ctx = talloc_get_type_abort(*state, struct sysdb_test_ctx); ret = sysdb_store_group(test_ctx->domain, special_grp, - 10002, NULL, 1, 0); + 10002, NULL, CACHE_TIMEOUT, 0); assert_int_equal(ret, EOK); ret = sysdb_store_group(test_ctx->domain, empty_special_grp, - 10003, NULL, 1, 0); + 10003, NULL, CACHE_TIMEOUT, 0); assert_int_equal(ret, EOK); ret = sysdb_store_group(test_ctx->domain, grp, - 10004, NULL, 1, 0); + 10004, NULL, CACHE_TIMEOUT, 0); assert_int_equal(ret, EOK); ret = sysdb_store_group(test_ctx->domain, empty_grp, - 10005, NULL, 1, 0); + 10005, NULL, CACHE_TIMEOUT, 0); assert_int_equal(ret, EOK); ret = sysdb_store_user(test_ctx->domain, "test_user", NULL, |