Skip to content

Commit

Permalink
Stop the publisher after use in the individual tests
Browse files Browse the repository at this point in the history
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
  • Loading branch information
Adam.Dybbroe committed Jul 14, 2023
1 parent 6d4af54 commit a79ebbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions activefires_pp/tests/test_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_check_incoming_message_nc_file_exists(setup_comm,
with patched_publisher() as published_messages:
result = afpp.check_incoming_message_and_get_filename(input_msg)

afpp.publisher.stop()
assert result is None
assert len(published_messages) == 2
assert 'No fire detections for this granule' in published_messages[0]
Expand Down Expand Up @@ -113,6 +114,7 @@ def test_check_incoming_message_txt_file_exists(setup_comm,
with patched_publisher() as published_messages:
result = afpp.check_incoming_message_and_get_filename(input_msg)

afpp.publisher.stop()
assert len(published_messages) == 0
assert result == '/san1/polar_out/direct_readout/viirs_active_fires/unfiltered/AFIMG_npp_d20230705_t1007509_e1009151_b60553_c20230705102721942345_cspp_dev.txt' # noqa

Expand Down Expand Up @@ -144,6 +146,7 @@ def test_check_incoming_message_txt_file_does_not_exist(setup_comm,
with patched_publisher() as published_messages:
result = afpp.check_incoming_message_and_get_filename(input_msg)

afpp.publisher.stop()
assert len(published_messages) == 0
assert result is None

Expand Down

0 comments on commit a79ebbd

Please sign in to comment.