mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Backed out 2 changesets (bug 1865633
) for causing xpc timeout failures CLOSED TREE
Backed out changeset 9d7ac5e26b77 (bug1865633
) Backed out changeset 29d421dab1d6 (bug1865633
)
This commit is contained in:
parent
ab6bc9f31e
commit
2b372da017
@ -708,8 +708,7 @@ impl Http3ProxyServer {
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("error is {:?}, stream will be reset", e);
|
||||
let _ = stream.stream_reset_send(Error::HttpRequestCancelled.code());
|
||||
eprintln!("error is {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1395,11 +1395,7 @@ class MochitestDesktop(object):
|
||||
serverOptions["isWin"] = mozinfo.isWin
|
||||
serverOptions["proxyPort"] = options.http3ServerPort
|
||||
env = test_environment(xrePath=options.xrePath, log=self.log)
|
||||
serverEnv = env.copy()
|
||||
serverLog = env.get("MOZHTTP3_SERVER_LOG")
|
||||
if serverLog is not None:
|
||||
serverEnv["RUST_LOG"] = serverLog
|
||||
self.http3Server = Http3Server(serverOptions, serverEnv, self.log)
|
||||
self.http3Server = Http3Server(serverOptions, env, self.log)
|
||||
self.http3Server.start()
|
||||
|
||||
port = self.http3Server.ports().get("MOZHTTP3_PORT_PROXY")
|
||||
|
@ -11,7 +11,6 @@ import time
|
||||
from argparse import Namespace
|
||||
from contextlib import contextmanager
|
||||
from subprocess import PIPE, Popen
|
||||
from threading import Thread
|
||||
|
||||
|
||||
@contextmanager
|
||||
@ -53,8 +52,6 @@ class Http3Server(object):
|
||||
self._proxyPort = -1
|
||||
if options.get("proxyPort"):
|
||||
self._proxyPort = options["proxyPort"]
|
||||
self.outthread = None
|
||||
self.errthread = None
|
||||
|
||||
def ports(self):
|
||||
return self._ports
|
||||
@ -62,17 +59,6 @@ class Http3Server(object):
|
||||
def echConfig(self):
|
||||
return self._echConfig
|
||||
|
||||
def read_streams(self, name, proc, pipe):
|
||||
while True:
|
||||
line = pipe.readline()
|
||||
output = "stdout" if pipe == proc.stdout else "stderr"
|
||||
if line:
|
||||
self._log.info("server: %s [%s] %s" % (name, output, line))
|
||||
|
||||
# Check if process is dead
|
||||
if proc.poll() is not None:
|
||||
break
|
||||
|
||||
def start(self):
|
||||
if not os.path.exists(self._http3ServerPath):
|
||||
raise Exception("Http3 server not found at %s" % self._http3ServerPath)
|
||||
@ -121,17 +107,6 @@ class Http3Server(object):
|
||||
self._ports["MOZHTTP3_PORT_PROXY"] = searchObj.group(4)
|
||||
self._ports["MOZHTTP3_PORT_NO_RESPONSE"] = searchObj.group(5)
|
||||
self._echConfig = searchObj.group(6)
|
||||
name = "http3server"
|
||||
t1 = Thread(
|
||||
target=self.read_streams, args=(name, process, process.stdout)
|
||||
)
|
||||
t1.start()
|
||||
t2 = Thread(
|
||||
target=self.read_streams, args=(name, process, process.stderr)
|
||||
)
|
||||
t2.start()
|
||||
self.outthread = t1
|
||||
self.errthread = t2
|
||||
except OSError as e:
|
||||
# This occurs if the subprocess couldn't be started
|
||||
self._log.error("Could not run the http3 server: %s" % (str(e)))
|
||||
@ -154,12 +129,17 @@ class Http3Server(object):
|
||||
self._log.info("Killing proc")
|
||||
proc.kill()
|
||||
break
|
||||
if self.outthread is not None:
|
||||
self.outthread.join()
|
||||
del self.outthread
|
||||
if self.errthread is not None:
|
||||
self.errthread.join()
|
||||
del self.errthread
|
||||
|
||||
def dumpOutput(fd, label):
|
||||
firstTime = True
|
||||
for msg in fd:
|
||||
if firstTime:
|
||||
firstTime = False
|
||||
self._log.info("Process %s" % label)
|
||||
self._log.info(msg)
|
||||
|
||||
dumpOutput(proc.stdout, "stdout")
|
||||
dumpOutput(proc.stderr, "stderr")
|
||||
self._http3ServerProc = {}
|
||||
|
||||
|
||||
|
@ -1494,11 +1494,7 @@ class XPCShellTests(object):
|
||||
options["profilePath"] = dbPath
|
||||
options["isMochitest"] = False
|
||||
options["isWin"] = sys.platform == "win32"
|
||||
serverEnv = self.env.copy()
|
||||
serverLog = self.env.get("MOZHTTP3_SERVER_LOG")
|
||||
if serverLog is not None:
|
||||
serverEnv["RUST_LOG"] = serverLog
|
||||
self.http3Server = Http3Server(options, serverEnv, self.log)
|
||||
self.http3Server = Http3Server(options, self.env, self.log)
|
||||
self.http3Server.start()
|
||||
for key, value in self.http3Server.ports().items():
|
||||
self.env[key] = value
|
||||
|
Loading…
Reference in New Issue
Block a user