mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-02 18:48:26 +00:00
Remove unneeded sleeps from tests (#1784)
Also use a unique file name for every test. This ensures that tests like test_external_directory_creation and test_external_modification do not collide.
This commit is contained in:
parent
0abeec9cae
commit
495d51113c
@ -356,7 +356,6 @@ function test_external_modification {
|
||||
describe "Test external modification to an object ..."
|
||||
echo "old" > ${TEST_TEXT_FILE}
|
||||
OBJECT_NAME="$(basename $PWD)/${TEST_TEXT_FILE}"
|
||||
sleep 2
|
||||
echo "new new" | aws_cli s3 cp - "s3://${TEST_BUCKET_1}/${OBJECT_NAME}"
|
||||
cmp ${TEST_TEXT_FILE} <(echo "new new")
|
||||
rm -f ${TEST_TEXT_FILE}
|
||||
@ -365,7 +364,6 @@ function test_external_modification {
|
||||
function test_read_external_object() {
|
||||
describe "create objects via aws CLI and read via s3fs ..."
|
||||
OBJECT_NAME="$(basename $PWD)/${TEST_TEXT_FILE}"
|
||||
sleep 3
|
||||
echo "test" | aws_cli s3 cp - "s3://${TEST_BUCKET_1}/${OBJECT_NAME}"
|
||||
cmp ${TEST_TEXT_FILE} <(echo "test")
|
||||
rm -f ${TEST_TEXT_FILE}
|
||||
|
@ -235,7 +235,10 @@ function run_suite {
|
||||
key_prefix="testrun-$RANDOM"
|
||||
cd_run_dir $key_prefix
|
||||
for t in "${TEST_LIST[@]}"; do
|
||||
$t $key_prefix; rc=$?
|
||||
# Ensure test input name differs every iteration
|
||||
TEST_TEXT_FILE=test-s3fs.txt-$RANDOM
|
||||
$t $key_prefix && rc=$? || rc=$?
|
||||
|
||||
if [[ $rc == 0 ]] ; then
|
||||
report_pass $t
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user