Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
5c431f42
Commit
5c431f42
authored
7 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Matthew's fixes to the unit tests
Extracted from
https://github.com/matrix-org/synapse/pull/2820
parent
d84f6525
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/replication/slave/storage/_base.py
+6
-2
6 additions, 2 deletions
tests/replication/slave/storage/_base.py
with
6 additions
and
2 deletions
tests/replication/slave/storage/_base.py
+
6
−
2
View file @
5c431f42
...
...
@@ -15,6 +15,8 @@
from
twisted.internet
import
defer
,
reactor
from
tests
import
unittest
import
tempfile
from
mock
import
Mock
,
NonCallableMock
from
tests.utils
import
setup_test_homeserver
from
synapse.replication.tcp.resource
import
ReplicationStreamProtocolFactory
...
...
@@ -41,7 +43,9 @@ class BaseSlavedStoreTestCase(unittest.TestCase):
self
.
event_id
=
0
server_factory
=
ReplicationStreamProtocolFactory
(
self
.
hs
)
listener
=
reactor
.
listenUNIX
(
"
\0
xxx
"
,
server_factory
)
# XXX: mktemp is unsafe and should never be used. but we're just a test.
path
=
tempfile
.
mktemp
(
prefix
=
"
base_slaved_store_test_case_socket
"
)
listener
=
reactor
.
listenUNIX
(
path
,
server_factory
)
self
.
addCleanup
(
listener
.
stopListening
)
self
.
streamer
=
server_factory
.
streamer
...
...
@@ -49,7 +53,7 @@ class BaseSlavedStoreTestCase(unittest.TestCase):
client_factory
=
ReplicationClientFactory
(
self
.
hs
,
"
client_name
"
,
self
.
replication_handler
)
client_connector
=
reactor
.
connectUNIX
(
"
\0
xxx
"
,
client_factory
)
client_connector
=
reactor
.
connectUNIX
(
path
,
client_factory
)
self
.
addCleanup
(
client_factory
.
stopTrying
)
self
.
addCleanup
(
client_connector
.
disconnect
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment