Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
823c037c
Commit
823c037c
authored
Jan 05, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp/tests: Use a wait event instead of an unconditional sleep in the server thread.
parent
1c21aeee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
winhttp.c
dlls/winhttp/tests/winhttp.c
+8
-1
No files found.
dlls/winhttp/tests/winhttp.c
View file @
823c037c
...
...
@@ -31,6 +31,7 @@
#include "wine/test.h"
static
HANDLE
wait_event
;
static
const
WCHAR
test_useragent
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'R'
,
'e'
,
'g'
,
'r'
,
'e'
,
's'
,
's'
,
'i'
,
'o'
,
'n'
,
' '
,
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
test_winehq
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
...
...
@@ -1901,7 +1902,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
if
(
strstr
(
buffer
,
"GET /not_modified"
))
{
send
(
c
,
notmodified
,
sizeof
notmodified
-
1
,
0
);
Sleep
(
6
000
);
WaitForSingleObject
(
wait_event
,
5
000
);
}
if
(
strstr
(
buffer
,
"GET /quit"
))
{
...
...
@@ -2249,6 +2250,8 @@ static void test_not_modified(int port)
ret
=
WinHttpReceiveResponse
(
request
,
NULL
);
ok
(
ret
,
"WinHttpReceiveResponse failed: %u
\n
"
,
GetLastError
());
SetEvent
(
wait_event
);
size
=
sizeof
(
status
);
ret
=
WinHttpQueryHeaders
(
request
,
WINHTTP_QUERY_STATUS_CODE
|
WINHTTP_QUERY_FLAG_NUMBER
,
NULL
,
&
status
,
&
size
,
NULL
);
...
...
@@ -3272,6 +3275,8 @@ START_TEST (winhttp)
if
(
ret
!=
WAIT_OBJECT_0
)
return
;
wait_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
test_connection_info
(
si
.
port
);
test_basic_request
(
si
.
port
,
NULL
,
basicW
);
test_no_headers
(
si
.
port
);
...
...
@@ -3284,5 +3289,7 @@ START_TEST (winhttp)
/* send the basic request again to shutdown the server thread */
test_basic_request
(
si
.
port
,
NULL
,
quitW
);
CloseHandle
(
wait_event
);
WaitForSingleObject
(
thread
,
3000
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment