test: attempt to send QUIT to smtp-dummy in case mail send failed
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 16 Nov 2011 21:25:19 +0000 (23:25 +0200)
committerDavid Bremner <bremner@debian.org>
Fri, 18 Nov 2011 14:49:53 +0000 (10:49 -0400)
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.

test/test-lib.sh

index cf309f9440d4b8a9cc4f4fe941f2b87b36470ef9..93867b03c4e05bb96461ab767d2232a36ebb866f 100755 (executable)
@@ -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
 }