From c21de9099b9fc46cc2af4de66d20f8a72dd37576 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Sat, 6 May 2023 09:49:21 +0200 Subject: add more sleep commands Signed-off-by: Benjamin Brahmer --- tests/updater/update.bats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/updater/update.bats b/tests/updater/update.bats index 65ce51307..ba978dbb0 100644 --- a/tests/updater/update.bats +++ b/tests/updater/update.bats @@ -43,10 +43,16 @@ teardown() { @test "[$TESTSUITE] Test simple update" { # Create Feed FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)') + + sleep 2 + # Get Items ID_LIST1=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) # Trigger Update http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID + + sleep 2 + # Get Items again ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) @@ -56,6 +62,9 @@ teardown() { @test "[$TESTSUITE] Test simple update with new content" { # Create Feed FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)') + + sleep 2 + # Get Items ID_LIST1=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) @@ -63,6 +72,9 @@ teardown() { # Trigger Update http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds/update userId=${user} feedId=$FEEDID + + sleep 2 + # Get Items again ID_LIST2=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) @@ -139,6 +151,9 @@ teardown() { php ${BATS_TEST_DIRNAME}/../test_helper/php-feed-generator/feed-generator.php -a 210 -f ${BATS_TEST_DIRNAME}/../test_helper/feeds/test.xml # Create Feed FEEDID=$(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} POST ${BASE_URLv1}/feeds url=$TEST_FEED | grep -Po '"id":\K([0-9]+)') + + sleep 2 + # Get Items ID_LIST=($(http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/items | grep -Po '"id":\K([0-9]+)' | tr '\n' ' ')) -- cgit v1.2.3