Skip to content

Commit

Permalink
After the fact feedback from PR #558 (#564)
Browse files Browse the repository at this point in the history
* After the fact feedback from PR #558

* Raise timeout to 10 seconds
  • Loading branch information
texasaggie97 authored Apr 15, 2024
1 parent 06da4f4 commit 31a89b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/component/test_task_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test___done_event_registered___run_finite_acquisition___callback_invoked_onc
@pytest.mark.grpc_xfail(
reason="#559: Can't close tasks in an event callback when using gRPC", raises=AssertionError
)
def test___done_event_registered___call_clear_in_callback___stop_close_in_callback_with_success_status(
def test___done_event_registered___call_stop_close_in_callback___task_closed_with_success_status(
sim_6363_device: nidaqmx.system.Device,
init_kwargs: dict,
) -> None:
Expand Down Expand Up @@ -92,7 +92,8 @@ def _clear_task():

task.start()
event_observer.wait_for_events(1)
acquired = side_effect_semaphore.acquire(timeout=1.0)
acquired = side_effect_semaphore.acquire(timeout=10.0)

# Ensure we get the expected exception and warning
with pytest.raises(nidaqmx.DaqError) as exc_info:
task.stop()
Expand All @@ -101,7 +102,6 @@ def _clear_task():
match="Attempted to close NI-DAQmx task",
) as warnings_record:
task.close()

assert acquired
assert len(event_observer.events) == 1
assert event_observer.events[0].status == 0
Expand All @@ -112,7 +112,7 @@ def _clear_task():
@pytest.mark.grpc_xfail(
reason="#559: Can't close tasks in an event callback when using gRPC", raises=AssertionError
)
def test___every_n_samples_event_registered___call_clear_in_callback___stop_close_in_callback_with_success_status(
def test___every_n_samples_event_registered___call_stop_close_in_callback___task_closed_with_success_status(
sim_6363_device: nidaqmx.system.Device,
init_kwargs: dict,
) -> None:
Expand Down Expand Up @@ -151,7 +151,8 @@ def _clear_task():

task.start()
event_observer.wait_for_events(4)
acquired = side_effect_semaphore.acquire(timeout=1.0)
acquired = side_effect_semaphore.acquire(timeout=10.0)

# Ensure we get the expected exception and warning
with pytest.raises(nidaqmx.DaqError) as exc_info:
task.stop()
Expand All @@ -160,7 +161,6 @@ def _clear_task():
match="Attempted to close NI-DAQmx task",
) as warnings_record:
task.close()

assert acquired
assert len(event_observer.events) == 4
assert [e.number_of_samples for e in event_observer.events] == [100, 100, 100, 100]
Expand Down

0 comments on commit 31a89b5

Please sign in to comment.