Skip to content

Commit

Permalink
Remove the sleep time in the context of testing poll_run_url_status #…
Browse files Browse the repository at this point in the history
…1411 (#1412)

Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez authored Oct 21, 2024
1 parent 54be562 commit 217f766
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ v34.8.2 (unreleased)
``android_inspector``, which provides a pipeline for Android APK
deploy-to-development analysis.

- Remove the sleep time in the context of testing ``matchcode.poll_run_url_status``
to speed up the test.
https://github.com/aboutcode-org/scancode.io/issues/1411

v34.8.1 (2024-09-06)
--------------------

Expand Down
8 changes: 4 additions & 4 deletions scanpipe/tests/pipes/test_matchcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_scanpipe_pipes_matchcode_poll_run_url_status(
"status": run_status.SUCCESS,
},
]
return_value = matchcode.poll_run_url_status(run_url)
return_value = matchcode.poll_run_url_status(run_url, sleep=0)
self.assertEqual(True, return_value)

# Failure
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_scanpipe_pipes_matchcode_poll_run_url_status(
},
]
with self.assertRaises(Exception) as context:
matchcode.poll_run_url_status(run_url)
matchcode.poll_run_url_status(run_url, sleep=0)
self.assertTrue("failure message" in str(context.exception))

# Stopped
Expand Down Expand Up @@ -198,7 +198,7 @@ def test_scanpipe_pipes_matchcode_poll_run_url_status(
},
]
with self.assertRaises(Exception) as context:
matchcode.poll_run_url_status(run_url)
matchcode.poll_run_url_status(run_url, sleep=0)
self.assertTrue("stop message" in str(context.exception))

# Stale
Expand Down Expand Up @@ -227,7 +227,7 @@ def test_scanpipe_pipes_matchcode_poll_run_url_status(
},
]
with self.assertRaises(Exception) as context:
matchcode.poll_run_url_status(run_url)
matchcode.poll_run_url_status(run_url, sleep=0)
self.assertTrue("stale message" in str(context.exception))

def test_scanpipe_pipes_matchcode_map_match_results(self):
Expand Down

0 comments on commit 217f766

Please sign in to comment.