Page MenuHomeSoftware Heritage

tests: Reduce db initialization fixtures to a minimum
ClosedPublic

Authored by ardumont on Oct 30 2020, 9:27 AM.

Details

Summary

Hopefully, this clarifies a bit the fixtures...

Test Plan

tox

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D4388 (id=15514)

Could not rebase; Attempt merge onto a19cb5fb51...

Updating a19cb5f..4c91df5
Fast-forward
 swh/lister/core/lister_base.py            |  1 +
 swh/lister/debian/tests/conftest.py       | 46 +++++++++++++++----------------
 swh/lister/launchpad/tests/conftest.py    |  9 ++----
 swh/lister/launchpad/tests/test_lister.py |  3 +-
 swh/lister/pytest_plugin.py               | 14 ++++++----
 5 files changed, 36 insertions(+), 37 deletions(-)
Changes applied before test
commit 4c91df5938c28cb261e2313a41d752f314b4283e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 17:37:45 2020 +0100

    tests: Reduce db initialization fixtures to a minimum

commit b35dff1266182b74e2765c3a79b21b087b323186
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 16:54:10 2020 +0100

    Create listing task with a default of 3 if unspecified
    
    This will allow to retry task if they do not specify it.

commit e2a861c801e575935276bb1ac7ba5e549f9224cb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 22:09:32 2020 +0100

    debian.tests: Fix test
    
    The scheduler fixture introduced truncates tables in between tests. The debian
    tests unfortunately share state and it broke when that changed. This fixes the
    test by avoiding the truncation of the scheduler db table "task".
    
    Ideally those tests need to be reworked to avoid sharing state between tests.
    
    [1] https://jenkins.softwareheritage.org/job/DLS/job/tests/1043

Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/61/
See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/61/console

Build has FAILED

Patch application report for D4388 (id=15516)

Could not rebase; Attempt merge onto e2a861c801...

Updating e2a861c..baa1513
Fast-forward
 swh/lister/core/lister_base.py            |  1 +
 swh/lister/debian/tests/conftest.py       | 27 ++++-----------------------
 swh/lister/launchpad/tests/conftest.py    |  8 ++------
 swh/lister/launchpad/tests/test_lister.py |  3 +--
 swh/lister/pytest_plugin.py               | 14 +++++++++-----
 5 files changed, 17 insertions(+), 36 deletions(-)
Changes applied before test
commit baa151360584979b5153fb1ed645a06512e40d1c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 17:37:45 2020 +0100

    tests: Reduce db initialization fixtures to a minimum

commit b35dff1266182b74e2765c3a79b21b087b323186
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 16:54:10 2020 +0100

    Create listing task with a default of 3 if unspecified
    
    This will allow to retry task if they do not specify it.

Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/62/
See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/62/console

Build has FAILED

Patch application report for D4388 (id=15516)

Rebasing onto b35dff1266...

Current branch diff-target is up to date.
Changes applied before test
commit baa151360584979b5153fb1ed645a06512e40d1c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 17:37:45 2020 +0100

    tests: Reduce db initialization fixtures to a minimum

Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/64/
See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/64/console

ardumont edited the summary of this revision. (Show Details)

Drop lister.engine instruction introduced by mistake

Build has FAILED

Patch application report for D4388 (id=15522)

Rebasing onto b35dff1266...

Current branch diff-target is up to date.
Changes applied before test
commit b90ffa4bddee9ea242ebeaa235d24e850ab13ca9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 29 17:37:45 2020 +0100

    tests: Reduce db initialization fixtures to a minimum

Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/65/
See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/65/console

This revision was not accepted when it landed; it landed in state Needs Review.Oct 30 2020, 1:41 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.