Remove throwaway Rust HttpClient constructions from tests

These existed only to force the tokio thread pool to start before
reactor.run() under the old callWhenRunning-based startup. Now that the
pool starts lazily on first use, the constructions (and the
make_homeserver overrides that existed solely to host them) are dead
weight. The tearDown hooks that fire the reactor shutdown triggers stay:
they are still what stops the tokio pool for tests that exercise the
Rust /versions handler.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HyuiV3m44ZbK9o24EnMMES
This commit is contained in:
Erik Johnston
2026-07-28 09:44:48 +00:00
co-authored by Claude Opus 5
parent a6557c7989
commit 41cbc96b26
5 changed files with 0 additions and 65 deletions
-14
View File
@@ -31,7 +31,6 @@ from synapse.rest import admin
from synapse.rest.admin.experimental_features import ExperimentalFeature
from synapse.rest.client import login, push_rule, pusher, receipts, room, versions
from synapse.server import HomeServer
from synapse.synapse_rust.http_client import HttpClient
from synapse.types import JsonDict
from synapse.util.clock import Clock
@@ -1233,19 +1232,6 @@ class MSC3881VersionsTestCase(HomeserverTestCase):
versions.register_servlets,
]
def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer:
hs = self.setup_test_homeserver()
self._http_client = hs.get_proxied_http_client()
# The tokio thread pool is started lazily on first use, so no
# reactor startup hooks need to run here.
_ = HttpClient(
runtime=hs.get_rust_runtime(),
user_agent=self._http_client.user_agent.decode("utf8"),
)
return hs
def tearDown(self) -> None:
# MemoryReactor doesn't trigger the shutdown phases, and we want the
# Tokio thread pool to be stopped