aboutsummaryrefslogtreecommitdiff
path: root/tests/e2e.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/e2e.sh')
-rwxr-xr-xtests/e2e.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/e2e.sh b/tests/e2e.sh
index 20ce5dc..e51b18d 100755
--- a/tests/e2e.sh
+++ b/tests/e2e.sh
@@ -909,6 +909,17 @@ if command -v node >/dev/null; then
expect "announced to other extensions" "grep -c '^event dingger:importance {\"level\":\"high\"}$' $EXTLOG" 1
report "$I2" "" normal
expect "imp: set back by hand" "opt $I2 @dingger_importance" ""
+ # Unanswered, the extension sends a report again after 0.5 s, and gives
+ # up on it after 2 s.
+ working() { sed 's/\x1b\[[0-9;]*m//g' "$DIR/daemon.log" | grep -c "hook report pane=$I2 state=Working"; }
+ before=$(working)
+ start=$(python3 -c 'import time; print(time.time())')
+ iext "$I2" agent_start
+ took=$(python3 -c 'import time,sys; print(round(time.time() - float(sys.argv[1]), 2))' "$start")
+ sleep 0.6
+ expect "the daemon answers a report: the extension sends it once" "echo \$((\$(working) - before))" 1
+ expect "and is done with it at once ($took s, with the harness's 0.3 s pause)" \
+ "python3 -c 'import sys; print(float(sys.argv[1]) < 1.5)' $took" True 1
iext "$I2" session_start
expect "a new pi on the session reports it again" "opt $I2 @dingger_importance" high
# pi starts a session before any command runs.