Page MenuHomeSoftware Heritage

tests: Fix flaky test_resolve_swhids_snapshot_context
ClosedPublic

Authored by anlambert on Aug 10 2020, 2:54 PM.

Details

Summary

Pick the first branch and release in the snapshot instead of randomly
selecting it. As multiple branches can point to a same revision, this
ensures the same branch name will be picked when resolving a SWHID to
a browse URL.

Diff Detail

Repository
rDWAPPS Web applications
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 D3755 (id=13217)

Rebasing onto 0c15c048b4...

Current branch diff-target is up to date.
Changes applied before test
commit 239e060da46f855ada4112aa02319b3403f6928a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Aug 10 14:40:54 2020 +0200

    tests: Fix flaky test_resolve_swhids_snapshot_context
    
    Pick the first branch and release in the snapshot instead of randomly
    selecting it. As multiple branches can point to a same revision, this
    ensures the same branch name will be picked when resolving a SWHID to
    a browse URL.

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/web/tests/common/test_identifiers.py
428

.keys() is redundant

This revision is now accepted and ready to land.Aug 10 2020, 3:56 PM

Update: remove call to .keys()

Build is green

Patch application report for D3755 (id=13218)

Rebasing onto 0c15c048b4...

Current branch diff-target is up to date.
Changes applied before test
commit 9924a39bc52b4ddb2213c15fb1fbbc43a955660e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Aug 10 14:40:54 2020 +0200

    tests: Fix flaky test_resolve_swhids_snapshot_context
    
    Pick the first branch and release in the snapshot instead of randomly
    selecting it. As multiple branches can point to a same revision, this
    ensures the same branch name will be picked when resolving a SWHID to
    a browse URL.

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