Skip to content

Commit

Permalink
Remove wait and check loop from mk_test_file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gaul committed May 30, 2023
1 parent 4b3e715 commit fb1356d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions test/test-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fb1356d

Please sign in to comment.