From 1c3c17d1739290508bbc7644454027f8617ce59a Mon Sep 17 00:00:00 2001
From: Jeremy Harris <jgh146exb@wizmail.org>
Date: Wed, 31 May 2017 17:31:37 +0100
Subject: Testsuite: stabilize output sequence for case 4530

---
 test/confs/0906             |  2 ++
 test/log/4530               | 28 ++++++++++++++++------------
 test/mail/4530.y            |  4 ++--
 test/mail/4530.z            |  4 ++--
 test/scripts/4500-DKIM/4530 |  2 ++
 test/stdout/4530            |  4 ++--
 6 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/test/confs/0906 b/test/confs/0906
index 2c47966ea..0c7b83d5e 100644
--- a/test/confs/0906
+++ b/test/confs/0906
@@ -26,6 +26,8 @@ tls_certificate = DIR/aux-fixed/cert1
 tls_privatekey = DIR/aux-fixed/cert1
 .endif
 
+queue_run_in_order = true
+
 # ----- ACL -----
 
 begin acl
diff --git a/test/log/4530 b/test/log/4530
index 24d4253aa..f4ff0117c 100644
--- a/test/log/4530
+++ b/test/log/4530
@@ -1,17 +1,21 @@
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => z <z@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 => y <y@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
 
 ******** SERVER ********
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1224 port 1225
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp S=sss for z@test.ex
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp S=sss for z@test.ex
+1999-03-02 09:44:33 10HmaX-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for z@test.ex
+1999-03-02 09:44:33 10HmaX-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => z@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 6nn byte chunk, total 6nn\\n250 OK id=10HmaX-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp K S=sss for y@test.ex
 1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
-1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for z@test.ex
-1999-03-02 09:44:33 10HmaY-0005vi-00 => z <z@test.ex> R=localuser T=local_delivery
-1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaX-0005vi-00 => z@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 6nn byte chunk, total 6nn\\n250 OK id=10HmaY-0005vi-00"
-1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp K S=sss for y@test.ex
-1999-03-02 09:44:33 10HmbA-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
-1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for y@test.ex
-1999-03-02 09:44:33 10HmbA-0005vi-00 => y <y@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for y@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmbA-0005vi-00 => y@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 6nn byte chunk, total 6nn\\n250 OK id=10HmaY-0005vi-00"
 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => y@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 6nn byte chunk, total 6nn\\n250 OK id=10HmbA-0005vi-00"
-1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
diff --git a/test/mail/4530.y b/test/mail/4530.y
index 580e21dc7..445e41a95 100644
--- a/test/mail/4530.y
+++ b/test/mail/4530.y
@@ -2,7 +2,7 @@ From MAILER-DAEMON Tue Mar 02 09:44:33 1999
 Return-path: <>
 Received: from localhost ([127.0.0.1] helo=testhost.test.ex)
 	by testhost.test.ex with esmtp (Exim x.yz)
-	id 10HmbA-0005vi-00
+	id 10HmaY-0005vi-00
 	for y@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
 	s=sel; h=LIST; bh=CVpkzY75tV/NCKk5pPx4GnM3NX83xwCiT0xVwo0G1Rs=; b=TIqPqpKM5qf
@@ -12,7 +12,7 @@ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
 Received: from [127.0.0.1] (helo=xxx)
 	by testhost.test.ex with esmtp (Exim x.yz)
 	(envelope-from <CALLER@bloggs.com>)
-	id 10HmaZ-0005vi-00
+	id 10HmbA-0005vi-00
 	for y@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 Subject: simple test
 X-body-linecount: 0
diff --git a/test/mail/4530.z b/test/mail/4530.z
index 2e74291f5..1b4735507 100644
--- a/test/mail/4530.z
+++ b/test/mail/4530.z
@@ -2,7 +2,7 @@ From MAILER-DAEMON Tue Mar 02 09:44:33 1999
 Return-path: <>
 Received: from localhost ([127.0.0.1] helo=testhost.test.ex)
 	by testhost.test.ex with esmtp (Exim x.yz)
-	id 10HmaY-0005vi-00
+	id 10HmaX-0005vi-00
 	for z@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
 	s=sel; h=LIST; bh=CVpkzY75tV/NCKk5pPx4GnM3NX83xwCiT0xVwo0G1Rs=; b=TIqPqpKM5qf
@@ -12,7 +12,7 @@ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
 Received: from [127.0.0.1] (helo=xxx)
 	by testhost.test.ex with esmtp (Exim x.yz)
 	(envelope-from <CALLER@bloggs.com>)
-	id 10HmaX-0005vi-00
+	id 10HmaZ-0005vi-00
 	for z@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 Subject: simple test
 X-body-linecount: 0
diff --git a/test/scripts/4500-DKIM/4530 b/test/scripts/4500-DKIM/4530
index 822f2fe02..1465d5896 100644
--- a/test/scripts/4500-DKIM/4530
+++ b/test/scripts/4500-DKIM/4530
@@ -63,4 +63,6 @@ QUIT
 sleep 1
 #
 killdaemon
+exim -q
+****
 no_msglog_check
diff --git a/test/stdout/4530 b/test/stdout/4530
index a1f5cb471..9d64ae5f5 100644
--- a/test/stdout/4530
+++ b/test/stdout/4530
@@ -31,7 +31,7 @@ Connecting to 127.0.0.1 port 1224 ... connected
 >>> last line: 4
 >>> .
 ??? 250
-<<< 250 OK id=10HmaX-0005vi-00
+<<< 250 OK id=10HmaZ-0005vi-00
 >>> QUIT
 ??? 221
 <<< 221 testhost.test.ex closing connection
@@ -68,7 +68,7 @@ Connecting to 127.0.0.1 port 1224 ... connected
 ??? 250-
 <<< 250- 129 byte chunk, total 129
 ??? 250
-<<< 250 OK id=10HmaZ-0005vi-00
+<<< 250 OK id=10HmbA-0005vi-00
 >>> QUIT
 ??? 221
 <<< 221 testhost.test.ex closing connection
-- 
cgit v1.2.3