From 06a02c41c389fcea2bbcab00b2d2dd57837b1eb6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 5 Oct 2020 21:20:42 +0300 Subject: [PATCH] tests: reduce probability of locks during macos runs of live_test.v --- vlib/v/tests/live_test.v | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/vlib/v/tests/live_test.v b/vlib/v/tests/live_test.v index 36b18995f9..969f458f47 100644 --- a/vlib/v/tests/live_test.v +++ b/vlib/v/tests/live_test.v @@ -52,7 +52,6 @@ fn append_to_file(fname, s string) { f.writeln('\$s') //info := live.info() //f.writeln('>>> reloads: \${info.reloads} | ok reloads: \${info.reloads_ok}') - f.flush() f.close() } @@ -64,13 +63,11 @@ fn myprintln(s string) { [live] fn pmessage() string { - s := 'ORIGINAL' - myprintln(s) - return s + return 'ORIGINAL' } const ( - delay = 5 + delay = 20 ) fn edefault(name string, default string) string { res := os.getenv(name) @@ -87,14 +84,15 @@ fn main() { pmessage() pmessage() max_cycles := edefault('LIVE_CYCLES', '1').int() - // NB: 1000 * 5 = maximum of ~5s runtime + // NB: 1000 * 20 = maximum of ~20s runtime for i:=0; i