diff --git a/distributed/preloading.py b/distributed/preloading.py index f1e125b7b1..b3d6a8e6d1 100644 --- a/distributed/preloading.py +++ b/distributed/preloading.py @@ -120,6 +120,7 @@ def _import_module(name, file_dir=None) -> ModuleType: async def _download_module(url: str) -> ModuleType: + logger.info("Downloading preload at %s", url) assert is_webaddress(url) client = AsyncHTTPClient() diff --git a/distributed/tests/test_preload.py b/distributed/tests/test_preload.py index 2c35a59e06..989e3d629a 100644 --- a/distributed/tests/test_preload.py +++ b/distributed/tests/test_preload.py @@ -9,7 +9,7 @@ import dask from distributed import Client, Scheduler, Worker, Nanny -from distributed.utils_test import cluster +from distributed.utils_test import cluster, captured_logger from distributed.utils_test import loop, cleanup # noqa F401 @@ -139,7 +139,9 @@ def dask_setup(dask_server): app = web.Application([(r"/preload", MyHandler)]) server = app.listen(12345) try: - async with Scheduler(preload=["http://localhost:12345/preload"]) as s: - assert s.foo == 1 + with captured_logger("distributed.preloading") as log: + async with Scheduler(preload=["http://localhost:12345/preload"]) as s: + assert s.foo == 1 + assert "12345/preload" in log.getvalue() finally: server.stop()