summaryrefslogtreecommitdiff
path: root/trust/tests/test-token.c
diff options
context:
space:
mode:
Diffstat (limited to 'trust/tests/test-token.c')
-rw-r--r--trust/tests/test-token.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/trust/tests/test-token.c b/trust/tests/test-token.c
index 3b7d701..bdf1120 100644
--- a/trust/tests/test-token.c
+++ b/trust/tests/test-token.c
@@ -305,6 +305,9 @@ test_load_already (void)
handle = p11_index_find (test.index, cert, -1);
assert (handle != 0);
+ /* Have to wait to make sure changes are detected */
+ p11_sleep_ms (1100);
+
ret = p11_token_load (test.token);
assert_num_eq (ret, 0);
assert_num_eq (p11_index_find (test.index, cert, -1), handle);
@@ -331,6 +334,9 @@ test_load_unreadable (void)
test_write_file (test.directory, "test.cer", "", 0);
+ /* Have to wait to make sure changes are detected */
+ p11_sleep_ms (1100);
+
ret = p11_token_load (test.token);
assert_num_eq (ret, 0);
assert (p11_index_find (test.index, cert, -1) == 0);
@@ -357,6 +363,9 @@ test_load_gone (void)
test_delete_file (test.directory, "test.cer");
+ /* Have to wait to make sure changes are detected */
+ p11_sleep_ms (1100);
+
ret = p11_token_load (test.token);
assert_num_eq (ret, 0);
assert (p11_index_find (test.index, cert, -1) == 0);
@@ -378,6 +387,9 @@ test_load_found (void)
assert_num_eq (ret, 0);
assert (p11_index_find (test.index, cert, -1) == 0);
+ /* Have to wait to make sure changes are detected */
+ p11_sleep_ms (1100);
+
test_write_file (test.directory, "test.cer", test_cacert3_ca_der,
sizeof (test_cacert3_ca_der));