From 094936d7640c40f08ff1b9a6bad8bb050d5eb0ee Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 3 Mar 2021 09:56:22 +0200 Subject: [PATCH] ci: reduce chances of false positives from vweb_test.v on macos --- vlib/vweb/tests/vweb_test.v | 6 +++++- vlib/vweb/tests/vweb_test_server.v | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/vlib/vweb/tests/vweb_test.v b/vlib/vweb/tests/vweb_test.v index eda6d26b5b..a1f9259236 100644 --- a/vlib/vweb/tests/vweb_test.v +++ b/vlib/vweb/tests/vweb_test.v @@ -50,7 +50,11 @@ fn test_a_simple_vweb_app_runs_in_the_background() { res := os.system(server_exec_cmd) 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 diff --git a/vlib/vweb/tests/vweb_test_server.v b/vlib/vweb/tests/vweb_test_server.v index c3f04dc647..bf1f8ccc56 100644 --- a/vlib/vweb/tests/vweb_test_server.v +++ b/vlib/vweb/tests/vweb_test_server.v @@ -81,7 +81,7 @@ pub fn (mut app App) user_repo_settings(username string, repository string) vweb [post] ['/json_echo'] 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']) 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 [post] 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']) return app.ok(app.req.data) }