Skip to content

Commit c269aec

Browse files
committed
change some wording
Signed-off-by: Tim Li <ltim@uber.com>
1 parent 460f813 commit c269aec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cadence/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ def _validate_and_apply_defaults(options: StartWorkflowOptions) -> StartWorkflow
6060

6161
# Validate delay_start (must be non-negative)
6262
delay_start = options.get("delay_start")
63-
if delay_start is not None and delay_start < timedelta(0):
64-
raise ValueError("delay_start cannot be negative")
63+
if delay_start is not None and delay_start <= timedelta(0):
64+
raise ValueError("delay_start must be greater than 0")
6565

6666
# Validate jitter_start (must be non-negative)
6767
jitter_start = options.get("jitter_start")
68-
if jitter_start is not None and jitter_start < timedelta(0):
69-
raise ValueError("jitter_start cannot be negative")
68+
if jitter_start is not None and jitter_start <= timedelta(0):
69+
raise ValueError("jitter_start must be greater than 0")
7070

7171
return options
7272

tests/cadence/test_client_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def test_negative_jitter_start_raises_error(self):
310310
execution_start_to_close_timeout=timedelta(minutes=10),
311311
jitter_start=timedelta(seconds=-1),
312312
)
313-
with pytest.raises(ValueError, match="jitter_start cannot be negative"):
313+
with pytest.raises(ValueError, match="jitter_start must be greater than 0"):
314314
_validate_and_apply_defaults(options)
315315

316316
def test_zero_delay_start_is_valid(self):

0 commit comments

Comments
 (0)