[libsoup/issue-169: 4/4] auth-test: use g_usleep
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/issue-169: 4/4] auth-test: use g_usleep
- Date: Mon, 23 Sep 2019 10:18:50 +0000 (UTC)
commit 19f0d91d5d2a0a44c32fc02aa91a9f477795e519
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Mon Sep 23 12:05:56 2019 +0200
auth-test: use g_usleep
Instead of using a Windows specific define.
tests/auth-test.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/tests/auth-test.c b/tests/auth-test.c
index 32211d29..95de60c2 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -5,13 +5,6 @@
static const char *base_uri;
static GMainLoop *loop;
-#if defined (G_OS_WIN32) && defined (_MSC_VER)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#define sleep(x) Sleep (x * 1000)
-#endif
-
typedef struct {
/* Explanation of what you should see */
const char *explanation;
@@ -471,12 +464,12 @@ do_digest_expiration_test (void)
uri = g_strconcat (base_uri, "Digest/realm1/", NULL);
do_digest_nonce_test (session, "First", uri, TRUE, TRUE, TRUE);
g_free (uri);
- sleep (2);
+ g_usleep (2 * G_USEC_PER_SEC);
uri = g_strconcat (base_uri, "Digest/realm1/expire/", NULL);
do_digest_nonce_test (session, "Second", uri, TRUE, TRUE, FALSE);
- sleep (1);
+ g_usleep (1 * G_USEC_PER_SEC);
do_digest_nonce_test (session, "Third", uri, TRUE, FALSE, FALSE);
- sleep (1);
+ g_usleep (1 * G_USEC_PER_SEC);
do_digest_nonce_test (session, "Fourth", uri, TRUE, FALSE, FALSE);
g_free (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]