aboutsummaryrefslogtreecommitdiff
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorTomi Ollila <tomi.ollila@iki.fi>2011-11-16 23:25:19 +0200
committerDavid Bremner <bremner@debian.org>2011-11-18 10:49:53 -0400
commitc832dad3224f627e528530102976b172048758ea (patch)
treef2bc2fdcd856cbe4cea9737b52a5eef5fe8c723d /test/test-lib.sh
parent8efdc0518d1887737f79d3eb37c461f0d314f5e1 (diff)
test: attempt to send QUIT to smtp-dummy in case mail send failed
If mail sending from emacs fails before it has chance to connect to the smtp-dummy mail server, the opportunistic QUIT message sending makes smtp-dummy to exit.
Diffstat (limited to 'test/test-lib.sh')
-rwxr-xr-xtest/test-lib.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index cf309f9..93867b0 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -398,6 +398,8 @@ emacs_deliver_message ()
(insert \"${body}\")
$@
(message-send-and-exit))"
+ # opportunistically quit smtp-dummy in case above fails.
+ { echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null
wait ${smtp_dummy_pid}
notmuch new >/dev/null
}