ci: reduce chances of false positives from vweb_test.v on macos

pull/9084/head
Delyan Angelov 2021-03-03 09:56:22 +02:00
parent c74fa9e471
commit 094936d764
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 7 additions and 3 deletions

View File

@ -50,7 +50,11 @@ fn test_a_simple_vweb_app_runs_in_the_background() {
res := os.system(server_exec_cmd) res := os.system(server_exec_cmd)
assert res == 0 assert res == 0
} }
time.sleep(100 * time.millisecond) $if macos {
time.sleep(1000 * time.millisecond)
} $else {
time.sleep(100 * time.millisecond)
}
} }
// web client tests follow // web client tests follow

View File

@ -81,7 +81,7 @@ pub fn (mut app App) user_repo_settings(username string, repository string) vweb
[post] [post]
['/json_echo'] ['/json_echo']
pub fn (mut app App) json_echo() vweb.Result { pub fn (mut app App) json_echo() vweb.Result {
eprintln('>>>>> received http request at /json_echo is: $app.req') // eprintln('>>>>> received http request at /json_echo is: $app.req')
app.set_content_type(app.req.headers['Content-Type']) app.set_content_type(app.req.headers['Content-Type'])
return app.ok(app.req.data) return app.ok(app.req.data)
} }
@ -89,7 +89,7 @@ pub fn (mut app App) json_echo() vweb.Result {
// Make sure [post] works without the path // Make sure [post] works without the path
[post] [post]
pub fn (mut app App) json() vweb.Result { pub fn (mut app App) json() vweb.Result {
eprintln('>>>>> received http request at /json is: $app.req') // eprintln('>>>>> received http request at /json is: $app.req')
app.set_content_type(app.req.headers['Content-Type']) app.set_content_type(app.req.headers['Content-Type'])
return app.ok(app.req.data) return app.ok(app.req.data)
} }