From c7f8f61d09a1ceab1c7c88704fcd406d2e133aed Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Mon, 15 Jul 2019 07:16:01 +0000 Subject: [PATCH] Change test_concurrency test --- test/integration-test-main.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration-test-main.sh b/test/integration-test-main.sh index 0aa66fd..5b339bc 100755 --- a/test/integration-test-main.sh +++ b/test/integration-test-main.sh @@ -532,17 +532,17 @@ function test_overwrite_existing_file_range { function test_concurrency { describe "Test concurrent updates to a directory" - for i in `seq 10`; do echo foo > $i; done - for process in `seq 2`; do - for i in `seq 100`; do - file=$(ls | sed -n "$(($RANDOM % 10 + 1))p") + for i in `seq 5`; do echo foo > $i; done + for process in `seq 10`; do + for i in `seq 5`; do + file=$(ls `seq 5` | sed -n "$(($RANDOM % 5 + 1))p") cat $file >/dev/null || true rm -f $file - echo foo > $i || true + echo foo > $file || true done & done wait - rm -f `seq 100` + rm -f `seq 5` } function test_open_second_fd {