From: Stephen Seo Date: Wed, 25 Sep 2024 07:23:04 +0000 (+0900) Subject: Sleep in test to ensure changed file timestamp X-Git-Tag: 1.0~24^2~3 X-Git-Url: https://git.seodisparate.com/stephenseo/js/bootstrap.bundle.min.js?a=commitdiff_plain;h=037845e50158d3ef9231cdb499b548c18dfb535e;p=c_simple_http Sleep in test to ensure changed file timestamp --- diff --git a/src/test.c b/src/test.c index 9c17dbe..8430b10 100644 --- a/src/test.c +++ b/src/test.c @@ -847,6 +847,11 @@ int main(void) { CHECK_TRUE(cache_file_size_0 == cache_file_size_1); // Change a file used by the template for PATH=/ . + // Sleep first since granularity is by the second. + puts("Sleeping for two seconds to ensure edited file's timestamp has " + "changed..."); + sleep(2); + puts("Done sleeping."); test_file = fopen(test_http_template_html_var_filename2, "w"); ASSERT_TRUE(test_file);