Skip to content

Commit 2b372da

Browse files
author
Sandor Molnar
committed
Backed out 2 changesets (bug 1865633) for causing xpc timeout failures CLOSED TREE
Backed out changeset 9d7ac5e26b77 (bug 1865633) Backed out changeset 29d421dab1d6 (bug 1865633)
1 parent ab6bc9f commit 2b372da

File tree

4 files changed

+14
-43
lines changed

4 files changed

+14
-43
lines changed

netwerk/test/http3server/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,7 @@ impl Http3ProxyServer {
708708
}
709709
}
710710
Err(e) => {
711-
eprintln!("error is {:?}, stream will be reset", e);
712-
let _ = stream.stream_reset_send(Error::HttpRequestCancelled.code());
711+
eprintln!("error is {:?}", e);
713712
}
714713
}
715714
}

testing/mochitest/runtests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,11 +1395,7 @@ def startHttp3Server(self, options):
13951395
serverOptions["isWin"] = mozinfo.isWin
13961396
serverOptions["proxyPort"] = options.http3ServerPort
13971397
env = test_environment(xrePath=options.xrePath, log=self.log)
1398-
serverEnv = env.copy()
1399-
serverLog = env.get("MOZHTTP3_SERVER_LOG")
1400-
if serverLog is not None:
1401-
serverEnv["RUST_LOG"] = serverLog
1402-
self.http3Server = Http3Server(serverOptions, serverEnv, self.log)
1398+
self.http3Server = Http3Server(serverOptions, env, self.log)
14031399
self.http3Server.start()
14041400

14051401
port = self.http3Server.ports().get("MOZHTTP3_PORT_PROXY")

testing/mozbase/mozserve/mozserve/servers.py

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from argparse import Namespace
1212
from contextlib import contextmanager
1313
from subprocess import PIPE, Popen
14-
from threading import Thread
1514

1615

1716
@contextmanager
@@ -53,26 +52,13 @@ def __init__(self, options, env, logger):
5352
self._proxyPort = -1
5453
if options.get("proxyPort"):
5554
self._proxyPort = options["proxyPort"]
56-
self.outthread = None
57-
self.errthread = None
5855

5956
def ports(self):
6057
return self._ports
6158

6259
def echConfig(self):
6360
return self._echConfig
6461

65-
def read_streams(self, name, proc, pipe):
66-
while True:
67-
line = pipe.readline()
68-
output = "stdout" if pipe == proc.stdout else "stderr"
69-
if line:
70-
self._log.info("server: %s [%s] %s" % (name, output, line))
71-
72-
# Check if process is dead
73-
if proc.poll() is not None:
74-
break
75-
7662
def start(self):
7763
if not os.path.exists(self._http3ServerPath):
7864
raise Exception("Http3 server not found at %s" % self._http3ServerPath)
@@ -121,17 +107,6 @@ def start(self):
121107
self._ports["MOZHTTP3_PORT_PROXY"] = searchObj.group(4)
122108
self._ports["MOZHTTP3_PORT_NO_RESPONSE"] = searchObj.group(5)
123109
self._echConfig = searchObj.group(6)
124-
name = "http3server"
125-
t1 = Thread(
126-
target=self.read_streams, args=(name, process, process.stdout)
127-
)
128-
t1.start()
129-
t2 = Thread(
130-
target=self.read_streams, args=(name, process, process.stderr)
131-
)
132-
t2.start()
133-
self.outthread = t1
134-
self.errthread = t2
135110
except OSError as e:
136111
# This occurs if the subprocess couldn't be started
137112
self._log.error("Could not run the http3 server: %s" % (str(e)))
@@ -154,12 +129,17 @@ def stop(self):
154129
self._log.info("Killing proc")
155130
proc.kill()
156131
break
157-
if self.outthread is not None:
158-
self.outthread.join()
159-
del self.outthread
160-
if self.errthread is not None:
161-
self.errthread.join()
162-
del self.errthread
132+
133+
def dumpOutput(fd, label):
134+
firstTime = True
135+
for msg in fd:
136+
if firstTime:
137+
firstTime = False
138+
self._log.info("Process %s" % label)
139+
self._log.info(msg)
140+
141+
dumpOutput(proc.stdout, "stdout")
142+
dumpOutput(proc.stderr, "stderr")
163143
self._http3ServerProc = {}
164144

165145

testing/xpcshell/runxpcshelltests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,11 +1494,7 @@ def startHttp3Server(self):
14941494
options["profilePath"] = dbPath
14951495
options["isMochitest"] = False
14961496
options["isWin"] = sys.platform == "win32"
1497-
serverEnv = self.env.copy()
1498-
serverLog = self.env.get("MOZHTTP3_SERVER_LOG")
1499-
if serverLog is not None:
1500-
serverEnv["RUST_LOG"] = serverLog
1501-
self.http3Server = Http3Server(options, serverEnv, self.log)
1497+
self.http3Server = Http3Server(options, self.env, self.log)
15021498
self.http3Server.start()
15031499
for key, value in self.http3Server.ports().items():
15041500
self.env[key] = value

0 commit comments

Comments
 (0)