From: Eric Wong <e@80x24.org>
Date: Sun, 24 Nov 2019 00:22:21 +0000 (+0000)
Subject: tests: disable daemon workers in a few more places
X-Git-Tag: v1.3.0~270
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9bd294a216c0cd2fd013afd6ff047848d35d76aa;p=public-inbox.git

tests: disable daemon workers in a few more places

There were still a few places where we used worker processes
unnecessarily in tests, causing a small amount of unnecessary
overhead.

Followup-to: ad221e9b2852f6c5 ("t/*.t: disable nntpd/httpd worker processes in most tests")
---

diff --git a/t/httpd-unix.t b/t/httpd-unix.t
index d0c70a72..2c918281 100644
--- a/t/httpd-unix.t
+++ b/t/httpd-unix.t
@@ -24,6 +24,7 @@ END { kill 'TERM', $pid if defined $pid };
 
 my $spawn_httpd = sub {
 	my (@args) = @_;
+	push @args, '-W0';
 	$pid = fork;
 	if ($pid == 0) {
 		exec $httpd, @args, "--stdout=$out", "--stderr=$err", $psgi;
diff --git a/t/nntpd.t b/t/nntpd.t
index b516ffd1..4795dc00 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -90,7 +90,7 @@ EOF
 	}
 
 	ok($sock, 'sock created');
-	my $cmd = [ $nntpd, "--stdout=$out", "--stderr=$err" ];
+	my $cmd = [ $nntpd, '-W0', "--stdout=$out", "--stderr=$err" ];
 	$pid = spawn_listener(undef, $cmd, [ $sock ]);
 	ok(defined $pid, 'forked nntpd process successfully');
 	my $host_port = $sock->sockhost . ':' . $sock->sockport;