Skip to content

Commit

Permalink
Make debounce less flakey
Browse files Browse the repository at this point in the history
  • Loading branch information
amh4r committed Nov 2, 2023
1 parent 48711e4 commit c36f2e3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/cases/debounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def create(

@inngest.create_function(
debounce=inngest.Debounce(
period=datetime.timedelta(seconds=1),
period=datetime.timedelta(seconds=2),
),
fn_id=test_name,
retries=0,
Expand All @@ -36,7 +36,7 @@ def fn_sync(

@inngest.create_function(
debounce=inngest.Debounce(
period=datetime.timedelta(seconds=3),
period=datetime.timedelta(seconds=2),
),
fn_id=test_name,
retries=0,
Expand All @@ -49,8 +49,12 @@ async def fn_async(
state.run_id = run_id

def run_test(self: base.TestClass) -> None:
self.client.send_sync(inngest.Event(name=event_name))
self.client.send_sync(inngest.Event(name=event_name))
self.client.send_sync(
[
inngest.Event(name=event_name),
inngest.Event(name=event_name),
]
)
run_id = state.wait_for_run_id(timeout=datetime.timedelta(seconds=10))
tests.helper.client.wait_for_run_status(
run_id,
Expand Down

0 comments on commit c36f2e3

Please sign in to comment.