Skip to content

Commit d1d90c2

Browse files
committed
Add debugging
1 parent 3fe7e42 commit d1d90c2

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,48 @@ jobs:
7474
- run: poe lint
7575
- run: poe build-develop
7676
- run: mkdir junit-xml
77+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
78+
timeout-minutes: 5
79+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
80+
timeout-minutes: 5
81+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
82+
timeout-minutes: 5
83+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
84+
timeout-minutes: 5
85+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
86+
timeout-minutes: 5
87+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
88+
timeout-minutes: 5
89+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
90+
timeout-minutes: 5
91+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
92+
timeout-minutes: 5
93+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
94+
timeout-minutes: 5
95+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
96+
timeout-minutes: 5
97+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
98+
timeout-minutes: 5
99+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
100+
timeout-minutes: 5
101+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
102+
timeout-minutes: 5
103+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
104+
timeout-minutes: 5
105+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
106+
timeout-minutes: 5
107+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
108+
timeout-minutes: 5
109+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
110+
timeout-minutes: 5
111+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
112+
timeout-minutes: 5
113+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
114+
timeout-minutes: 5
115+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
116+
timeout-minutes: 5
117+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
118+
timeout-minutes: 5
77119
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
78120
timeout-minutes: 15
79121
# Time skipping doesn't yet support ARM

tests/worker/test_worker.py

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

33
import asyncio
44
import concurrent.futures
5+
import logging
56
import uuid
67
from datetime import timedelta
78
from typing import Any, Awaitable, Callable, Optional, Sequence
@@ -64,6 +65,8 @@
6465
with workflow.unsafe.imports_passed_through():
6566
import pytest
6667

68+
logger = logging.getLogger(__name__)
69+
6770

6871
def test_load_default_worker_binary_id():
6972
# Just run it twice and confirm it didn't change
@@ -468,6 +471,7 @@ async def reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit:
468471
self.reserve_asserts(ctx)
469472
# Verify an async call doesn't bungle things
470473
await asyncio.sleep(0.01)
474+
logger.info("Reserve slot %d", self.reserves)
471475
self.reserves += 1
472476
return MyPermit(self.reserves)
473477

@@ -494,6 +498,8 @@ def release_slot(self, ctx: SlotReleaseContext) -> None:
494498
assert ctx.permit is not None
495499
assert isinstance(ctx.permit, MyPermit)
496500
assert ctx.permit.pnum is not None
501+
502+
logger.info("Release slot %d, %d", ctx.permit.pnum, self.highest_seen_reserve_on_release)
497503
self.highest_seen_reserve_on_release = max(
498504
ctx.permit.pnum, self.highest_seen_reserve_on_release
499505
)

0 commit comments

Comments
 (0)