Skip to content

Commit 1155d6f

Browse files
committed
switch poe lint and poe build-develop order in CI, revert test move
1 parent 012cdbe commit 1155d6f

File tree

3 files changed

+31
-40
lines changed

3 files changed

+31
-40
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
- run: uv sync --all-extras
5959
- run: poe bridge-lint
6060
if: ${{ matrix.clippyLinter }}
61-
- run: poe lint
6261
- run: poe build-develop
62+
- run: poe lint
6363
- run: mkdir junit-xml
6464
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
6565
timeout-minutes: 15

tests/bridge/test_plugins.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

tests/test_plugins.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import pytest
88

9+
import temporalio.bridge.temporal_sdk_bridge
910
import temporalio.client
1011
import temporalio.converter
1112
import temporalio.worker
@@ -177,6 +178,35 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
177178
]
178179

179180

181+
async def test_worker_plugin_names_forwarded_to_core(
182+
client: Client, monkeypatch: pytest.MonkeyPatch
183+
) -> None:
184+
captured_plugins: list[str] = []
185+
186+
original_new_worker = temporalio.bridge.temporal_sdk_bridge.new_worker
187+
188+
def new_worker_wrapper(runtime_ref, client_ref, config):
189+
nonlocal captured_plugins
190+
captured_plugins = list(config.plugins)
191+
return original_new_worker(runtime_ref, client_ref, config)
192+
193+
monkeypatch.setattr(
194+
temporalio.bridge.temporal_sdk_bridge,
195+
"new_worker",
196+
new_worker_wrapper,
197+
)
198+
199+
plugin1 = SimplePlugin("test-worker-plugin1")
200+
plugin2 = SimplePlugin("test-worker-plugin2")
201+
worker = Worker(
202+
client,
203+
task_queue="queue",
204+
activities=[never_run_activity],
205+
plugins=[plugin1, plugin2],
206+
)
207+
assert captured_plugins == [plugin1.name(), plugin2.name()]
208+
209+
180210
async def test_worker_duplicated_plugin(client: Client) -> None:
181211
new_config = client.config()
182212
new_config["plugins"] = [MyCombinedPlugin()]

0 commit comments

Comments
 (0)