From 0907262723dcb79d29e263d8dd3aa31ba563bd95 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Tue, 9 Nov 2021 10:21:31 -0800 Subject: [PATCH] Track timeout from app run start in deferred components integration test (#93307) --- .../deferred_components_test/run_release_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/integration_tests/deferred_components_test/run_release_test.sh b/dev/integration_tests/deferred_components_test/run_release_test.sh index 282b1fb572..120b85015e 100755 --- a/dev/integration_tests/deferred_components_test/run_release_test.sh +++ b/dev/integration_tests/deferred_components_test/run_release_test.sh @@ -19,7 +19,6 @@ adb_path=$2 # Store the time to prevent capturing logs from previous runs. script_start_time=$($adb_path shell 'date +"%m-%d %H:%M:%S.0"') -script_start_time_seconds=$(date +%s) $adb_path uninstall "io.flutter.integration.deferred_components_test" @@ -35,6 +34,7 @@ $adb_path shell " am start -n io.flutter.integration.deferred_components_test/.MainActivity exit " +run_start_time_seconds=$(date +%s) while read LOGLINE do if [[ "${LOGLINE}" == *"Running deferred code"* ]]; then @@ -45,8 +45,8 @@ do fi # Timeout if expected log not found current_time=$(date +%s) - if [[ $((current_time - script_start_time_seconds)) -ge 150 ]]; then - echo "Failure: Deferred component did not load." + if [[ $((current_time - run_start_time_seconds)) -ge 150 ]]; then + echo "Failure: Timed out, deferred component did not load." pkill -P $$ exit 1 fi