Skip to content

Commit 772278c

Browse files
committed
CI fix
1 parent 0f1a16c commit 772278c

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,7 @@ This internally downloads the Temporal time-skipping test server to a temporary
733733
then starts the test server which has special APIs for skipping time.
734734

735735
**NOTE:** The time-skipping test environment does not work on ARM. The SDK will try to download the x64 binary on macOS
736-
for use with the Intel emulator, but for Linux or Windows ARM there will be no proper time-skipping test server at this
737-
time.
736+
for use with the Intel emulator, but for Linux or Windows ARM there is no proper time-skipping test server at this time.
738737

739738
##### Automatic Time Skipping
740739

tests/test_client.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -910,10 +910,7 @@ async def test_schedule_backfill(
910910
pytest.skip("Java test server doesn't support schedules")
911911
await assert_no_schedules(client)
912912

913-
# Just in case it's on the minute boundary, move it off
914-
now = datetime.utcnow()
915-
if now.second == 0:
916-
now += timedelta(seconds=1)
913+
begin = datetime(year=2020, month=1, day=20, hour=5)
917914

918915
# Create paused schedule that runs every minute and has two backfills
919916
handle = await client.create_schedule(
@@ -934,8 +931,8 @@ async def test_schedule_backfill(
934931
),
935932
backfill=[
936933
ScheduleBackfill(
937-
start_at=now - timedelta(minutes=30),
938-
end_at=now - timedelta(minutes=29),
934+
start_at=begin - timedelta(minutes=30),
935+
end_at=begin - timedelta(minutes=29),
939936
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
940937
)
941938
],
@@ -945,13 +942,13 @@ async def test_schedule_backfill(
945942
# Add two more backfills and and -2m will be deduped
946943
await handle.backfill(
947944
ScheduleBackfill(
948-
start_at=now - timedelta(minutes=4),
949-
end_at=now - timedelta(minutes=2),
945+
start_at=begin - timedelta(minutes=4),
946+
end_at=begin - timedelta(minutes=2),
950947
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
951948
),
952949
ScheduleBackfill(
953-
start_at=now - timedelta(minutes=2),
954-
end_at=now,
950+
start_at=begin - timedelta(minutes=2),
951+
end_at=begin,
955952
overlap=ScheduleOverlapPolicy.ALLOW_ALL,
956953
),
957954
)

tests/testing/test_workflow.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ async def test_workflow_env_time_skipping_heartbeat_timeout():
132132
# Check the causes until heartbeat timeout
133133
assert isinstance(err.value.cause, ActivityError)
134134
assert isinstance(err.value.cause.cause, TimeoutError)
135-
assert isinstance(err.value.cause.cause.cause, TimeoutError)
136-
assert err.value.cause.cause.cause.type == TimeoutType.HEARTBEAT
135+
assert err.value.cause.cause.type == TimeoutType.HEARTBEAT
137136

138137

139138
@workflow.defn

0 commit comments

Comments
 (0)