Skip to content
Snippets Groups Projects
Unverified Commit 85c56445 authored by Patrick Cloke's avatar Patrick Cloke Committed by GitHub
Browse files

Support running synmark on macOS. (#8578)

By using the "poll" reactor since macOS doesn't support epoll.
parent 1fcdbeb3
No related branches found
No related tags found
No related merge requests found
Support macOS on the `synmark` benchmark runner.
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
import sys import sys
from twisted.internet import epollreactor try:
from twisted.internet.epollreactor import EPollReactor as Reactor
except ImportError:
from twisted.internet.pollreactor import PollReactor as Reactor
from twisted.internet.main import installReactor from twisted.internet.main import installReactor
from synapse.config.homeserver import HomeServerConfig from synapse.config.homeserver import HomeServerConfig
...@@ -63,7 +66,7 @@ def make_reactor(): ...@@ -63,7 +66,7 @@ def make_reactor():
Instantiate and install a Twisted reactor suitable for testing (i.e. not the Instantiate and install a Twisted reactor suitable for testing (i.e. not the
default global one). default global one).
""" """
reactor = epollreactor.EPollReactor() reactor = Reactor()
if "twisted.internet.reactor" in sys.modules: if "twisted.internet.reactor" in sys.modules:
del sys.modules["twisted.internet.reactor"] del sys.modules["twisted.internet.reactor"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment