From 1910856c6ca78b864cffd517ff07a890f1075b69 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 7 Jun 2023 07:24:31 -0700 Subject: [PATCH] Remove wait and check loop from mk_test_file (#2175) This appears to be some kind of eventual consistency check. This should have no effect given S3Proxy and recent AWS strong consistency. Also it is likely ineffective given the other test object creation operations. --- test/test-utils.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/test/test-utils.sh b/test/test-utils.sh index 82a65e0..ff3b7d0 100644 --- a/test/test-utils.sh +++ b/test/test-utils.sh @@ -137,22 +137,6 @@ function mk_test_file { echo "Could not create file ${TEST_TEXT_FILE}, it does not exist" exit 1 fi - - # wait & check - local BASE_TEXT_LENGTH; BASE_TEXT_LENGTH=$(echo "${TEXT}" | wc -c | awk '{print $1}') - local TRY_COUNT=10 - while true; do - local MK_TEXT_LENGTH - MK_TEXT_LENGTH=$(wc -c "${TEST_TEXT_FILE}" | awk '{print $1}') - if [ "${BASE_TEXT_LENGTH}" -eq "${MK_TEXT_LENGTH}" ]; then - break - fi - local TRY_COUNT=$((TRY_COUNT - 1)) - if [ "${TRY_COUNT}" -le 0 ]; then - echo "Could not create file ${TEST_TEXT_FILE}, that file size is something wrong" - fi - sleep 1 - done } function rm_test_file {