From c776c52eeded4cf4fe19f719bb93fc5288a1fb76 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 22 Jan 2018 16:44:39 +0000 Subject: [PATCH] Back out unrelated changes --- tests/replication/slave/storage/_base.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py index 74f104e3b..81063f19a 100644 --- a/tests/replication/slave/storage/_base.py +++ b/tests/replication/slave/storage/_base.py @@ -15,8 +15,6 @@ 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 @@ -43,9 +41,7 @@ class BaseSlavedStoreTestCase(unittest.TestCase): self.event_id = 0 server_factory = ReplicationStreamProtocolFactory(self.hs) - # 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) + listener = reactor.listenUNIX("\0xxx", server_factory) self.addCleanup(listener.stopListening) self.streamer = server_factory.streamer @@ -53,7 +49,7 @@ class BaseSlavedStoreTestCase(unittest.TestCase): client_factory = ReplicationClientFactory( self.hs, "client_name", self.replication_handler ) - client_connector = reactor.connectUNIX(path, client_factory) + client_connector = reactor.connectUNIX("\0xxx", client_factory) self.addCleanup(client_factory.stopTrying) self.addCleanup(client_connector.disconnect)