Page MenuHomeSoftware Heritage

Simplify journal client tests
ClosedPublic

Authored by douardda on Jan 20 2021, 12:42 PM.

Details

Summary
  • sort visits by default (there is a test dedicated to dealing with unsorted messagaes from the journal),
  • remove "intermediate checks" in several tests: these do not help much but make the code more difficult to read and maintain,
  • rename VISIT_STATUSES1 as VISIT_STATUSES_1 to make less prone to being confused with VISIT_STATUSES (which also exists).

Depends on D4893

Diff Detail

Repository
rDSCH Scheduling utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4894 (id=17385)

Could not rebase; Attempt merge onto b03d978241...

Updating b03d978..b95b341
Fast-forward
 swh/scheduler/journal_client.py            |  23 ++--
 swh/scheduler/tests/test_cli_journal.py    |   4 +-
 swh/scheduler/tests/test_journal_client.py | 189 +++++++++++------------------
 3 files changed, 87 insertions(+), 129 deletions(-)
Changes applied before test
commit b95b3412f6565d2d38ba958ae3b72bec2bf6af28
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Jan 20 12:32:40 2021 +0100

    Simplify journal client tests
    
    - sort visits by default (there is a test dedicated to dealing with unsorted
      messagaes from the journal),
    - remove "intermediate checks" in several tests: these do not help much
      but make the code more difficult to read and maintain,
    - rename VISIT_STATUSES1 as VISIT_STATUSES_1 to make less prone to
      being confused with VISIT_STATUSES (which also exists).

commit c386fdf3b9fc30946177e1ec0c05e0e814243f42
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Jan 20 12:24:10 2021 +0100

    Make the max_date() helper function accept *dates as argument
    
    so it can be called with more than 2 dates.

See https://jenkins.softwareheritage.org/job/DSCH/job/tests-on-diff/183/ for more details.

Build is green

Patch application report for D4894 (id=17437)

Rebasing onto c7b740cafa...

Current branch diff-target is up to date.
Changes applied before test
commit ffe2aed2fa329356e97bd9f8e160663c18bd0f06
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Jan 20 12:32:40 2021 +0100

    Simplify journal client tests
    
    - sort visits by default (there is a test dedicated to dealing with unsorted
      messagaes from the journal),
    - remove "intermediate checks" in several tests: these do not help much
      but make the code more difficult to read and maintain,
    - rename VISIT_STATUSES1 as VISIT_STATUSES_1 to make less prone to
      being confused with VISIT_STATUSES (which also exists).

See https://jenkins.softwareheritage.org/job/DSCH/job/tests-on-diff/201/ for more details.

This revision is now accepted and ready to land.Jan 21 2021, 9:45 AM
This revision was automatically updated to reflect the committed changes.