Page MenuHomeSoftware Heritage

tests: simplify and (possibly) fix the grpc_server helper context manager
ClosedPublic

Authored by douardda on Oct 18 2022, 10:56 AM.

Details

Summary

start the grpc server directly instead of starting the HTTP rpc server,
since this later is actually not used, and the url/port detection was
possibly misleading.

Depends on D8695

Diff Detail

Event Timeline

Build was aborted

Patch application report for D8696 (id=31403)

Could not rebase; Attempt merge onto 022b6f7661...

Updating 022b6f7..8799d85
Fast-forward
 pytest.ini                                         |   4 +
 swh/provenance/tests/conftest.py                   |  97 +----------------
 .../tests/data/generate_graph_dataset.py           |   2 +-
 swh/provenance/tests/test_archive_interface.py     |   5 +-
 swh/provenance/tests/test_cli.py                   |   4 +-
 swh/provenance/tests/test_conftest.py              |   3 +-
 swh/provenance/tests/test_consistency.py           |   3 +-
 swh/provenance/tests/test_directory_flatten.py     |   3 +-
 swh/provenance/tests/test_directory_iterator.py    |   3 +-
 swh/provenance/tests/test_history_graph.py         |   3 +-
 swh/provenance/tests/test_isochrone_graph.py       |   8 +-
 swh/provenance/tests/test_journal_client.py        |   3 +-
 swh/provenance/tests/test_origin_iterator.py       |   3 +-
 swh/provenance/tests/test_origin_revision_layer.py |   3 +-
 swh/provenance/tests/test_provenance_storage.py    |   3 +-
 swh/provenance/tests/test_replay.py                |   2 +-
 .../tests/test_revision_content_layer.py           |   8 +-
 swh/provenance/tests/test_revision_iterator.py     |   3 +-
 swh/provenance/tests/test_utils.py                 |  32 ------
 swh/provenance/tests/utils.py                      | 115 +++++++++++++++++++++
 20 files changed, 150 insertions(+), 157 deletions(-)
 delete mode 100644 swh/provenance/tests/test_utils.py
 create mode 100644 swh/provenance/tests/utils.py
Changes applied before test
commit 8799d8531c387cd5a330d2005946e2c1353bcfd1
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:16:09 2022 +0200

    tests: simplify and (possibly) fix the grpc_server helper context manager
    
    start the grpc server directly instead of starting the HTTP rpc server,
    since this later is actually not used, and the url/port detection was
    possibly misleading.

commit a3f7850711b61a596fc3b820ef929a235a5871af
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:15:14 2022 +0200

    Move all non pytest-related functions from conftest to utils.py
    
    and rename test_utils.py as utils.py to prevent confusion about this
    module not being a set of tests.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 18 2022, 11:12 AM
Harbormaster failed remote builds in B32351: Diff 31403!

Build is green

Patch application report for D8696 (id=31403)

Could not rebase; Attempt merge onto 022b6f7661...

Updating 022b6f7..8799d85
Fast-forward
 pytest.ini                                         |   4 +
 swh/provenance/tests/conftest.py                   |  97 +----------------
 .../tests/data/generate_graph_dataset.py           |   2 +-
 swh/provenance/tests/test_archive_interface.py     |   5 +-
 swh/provenance/tests/test_cli.py                   |   4 +-
 swh/provenance/tests/test_conftest.py              |   3 +-
 swh/provenance/tests/test_consistency.py           |   3 +-
 swh/provenance/tests/test_directory_flatten.py     |   3 +-
 swh/provenance/tests/test_directory_iterator.py    |   3 +-
 swh/provenance/tests/test_history_graph.py         |   3 +-
 swh/provenance/tests/test_isochrone_graph.py       |   8 +-
 swh/provenance/tests/test_journal_client.py        |   3 +-
 swh/provenance/tests/test_origin_iterator.py       |   3 +-
 swh/provenance/tests/test_origin_revision_layer.py |   3 +-
 swh/provenance/tests/test_provenance_storage.py    |   3 +-
 swh/provenance/tests/test_replay.py                |   2 +-
 .../tests/test_revision_content_layer.py           |   8 +-
 swh/provenance/tests/test_revision_iterator.py     |   3 +-
 swh/provenance/tests/test_utils.py                 |  32 ------
 swh/provenance/tests/utils.py                      | 115 +++++++++++++++++++++
 20 files changed, 150 insertions(+), 157 deletions(-)
 delete mode 100644 swh/provenance/tests/test_utils.py
 create mode 100644 swh/provenance/tests/utils.py
Changes applied before test
commit 8799d8531c387cd5a330d2005946e2c1353bcfd1
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:16:09 2022 +0200

    tests: simplify and (possibly) fix the grpc_server helper context manager
    
    start the grpc server directly instead of starting the HTTP rpc server,
    since this later is actually not used, and the url/port detection was
    possibly misleading.

commit a3f7850711b61a596fc3b820ef929a235a5871af
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:15:14 2022 +0200

    Move all non pytest-related functions from conftest to utils.py
    
    and rename test_utils.py as utils.py to prevent confusion about this
    module not being a set of tests.

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

Build is green

Patch application report for D8696 (id=31504)

Could not rebase; Attempt merge onto 60c5a5c463...

Updating 60c5a5c..f128fe0
Fast-forward
 pytest.ini                                         |   4 +
 swh/provenance/tests/conftest.py                   |  97 +----------------
 .../tests/data/generate_graph_dataset.py           |   2 +-
 swh/provenance/tests/test_archive_interface.py     |   5 +-
 swh/provenance/tests/test_cli.py                   |   4 +-
 swh/provenance/tests/test_conftest.py              |   3 +-
 swh/provenance/tests/test_consistency.py           |   3 +-
 swh/provenance/tests/test_directory_flatten.py     |   3 +-
 swh/provenance/tests/test_directory_iterator.py    |   3 +-
 swh/provenance/tests/test_history_graph.py         |   3 +-
 swh/provenance/tests/test_isochrone_graph.py       |   8 +-
 swh/provenance/tests/test_journal_client.py        |   9 +-
 swh/provenance/tests/test_origin_iterator.py       |   3 +-
 swh/provenance/tests/test_origin_revision_layer.py |   3 +-
 swh/provenance/tests/test_provenance_storage.py    |   3 +-
 swh/provenance/tests/test_replay.py                |   2 +-
 .../tests/test_revision_content_layer.py           |   8 +-
 swh/provenance/tests/test_revision_iterator.py     |   3 +-
 swh/provenance/tests/test_utils.py                 |  32 ------
 swh/provenance/tests/utils.py                      | 115 +++++++++++++++++++++
 20 files changed, 153 insertions(+), 160 deletions(-)
 delete mode 100644 swh/provenance/tests/test_utils.py
 create mode 100644 swh/provenance/tests/utils.py
Changes applied before test
commit f128fe08a1f2d3b422a228b4d1a068d90fb75d4d
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:16:09 2022 +0200

    tests: simplify and (possibly) fix the grpc_server helper context manager
    
    start the grpc server directly instead of starting the HTTP rpc server,
    since this later is actually not used, and the url/port detection was
    possibly misleading.

commit 4ed652e03d1277139bd4ec5c9a34b3dc76baf6e8
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:15:14 2022 +0200

    Move all non pytest-related functions from conftest to utils.py
    
    and rename test_utils.py as utils.py to prevent confusion about this
    module not being a set of tests.

commit b686e9a516e08add6efdc1c87e74246004036137
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 20:14:47 2022 +0200

    tests: small fixes in test_journal_client.py

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

Build is green

Patch application report for D8696 (id=31504)

Rebasing onto 4ed652e03d...

Current branch diff-target is up to date.
Changes applied before test
commit f128fe08a1f2d3b422a228b4d1a068d90fb75d4d
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:16:09 2022 +0200

    tests: simplify and (possibly) fix the grpc_server helper context manager
    
    start the grpc server directly instead of starting the HTTP rpc server,
    since this later is actually not used, and the url/port detection was
    possibly misleading.

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

olasd added a subscriber: olasd.

Woohoo, green tests!

pytest.ini
7

You don't seem to be using that yet? (I think it's a good idea, though)

This revision is now accepted and ready to land.Oct 20 2022, 11:58 AM

also add rabbitmq marker in pytest.ini

This revision was landed with ongoing or failed builds.Nov 2 2022, 4:56 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D8696 (id=31718)

Rebasing onto 4ed652e03d...

Current branch diff-target is up to date.
Changes applied before test
commit 90a4250a2c5713ff475c3d9c05fa3f736af9b151
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Oct 18 10:16:09 2022 +0200

    tests: simplify and (possibly) fix the grpc_server helper context manager
    
    start the grpc server directly instead of starting the HTTP rpc server,
    since this later is actually not used, and the url/port detection was
    possibly misleading.

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