Page MenuHomeSoftware Heritage

cassandra: Make origin_visit_status_get_random's interval consistent with postgresql
ClosedPublic

Authored by vlorentz on Aug 5 2022, 11:20 AM.

Details

Summary

The postgresql implementation uses '3 months', which is closer to 13 weeks
than to 12 weeks.

Diff Detail

Repository
rDSTO Storage manager
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 D8194 (id=29571)

Could not rebase; Attempt merge onto 4825f40a4f...

Updating 4825f40a..9b9eb282
Fast-forward
 swh/storage/cassandra/storage.py   | 2 +-
 swh/storage/tests/storage_tests.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Changes applied before test
commit 9b9eb282e83eb7ef8c11b7e6ca8d0164bf0dd141
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 11:20:33 2022 +0200

    cassandra: Make origin_visit_status_get_random's interval consistent with postgresql
    
    The postgresql implementation uses '3 months', which is closer to 13 weeks
    than to 12 weeks.

commit 56f69e56b81c5abc28cb6e217e298ab95fb501cb
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 11:18:46 2022 +0200

    Fix flakiness of test_origin_visit_status_get_random_nothing_found
    
    start is increased from 13 to 14, because 13 weeks is 91 days,
    ie. 30+31+30; so it is sometimes smaller than 3 months.
    
    This was only hit rarely because the number of visits was small,
    so this commit also increases the number of visits to make the
    test more likely to fail if it should actually fail.

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

ardumont added a subscriber: ardumont.

not wrong there ;)

This revision is now accepted and ready to land.Aug 5 2022, 11:43 AM