Opened 7 months ago

Closed 5 months ago

#28933 closed defect (implemented)

Run one sbws main loop using the test network as part of integration tests

Reported by: juga Owned by: juga
Priority: Medium Milestone: sbws: 1.0.x-final
Component: Core Tor/sbws Version: sbws: 1.0.2
Severity: Normal Keywords:
Cc: juga, teor Actual Points:
Parent ID: #28663 Points:
Reviewer: dgoulet Sponsor:

Description

Currently is not possible to run the main sbws scanner function run_speedtest because it uses threads, which doesn't work with pytest.
The threads could be mocked or run one single process, but behaviour would be different as with threads.
Since integration tests launch a testing network, it's possible to just run sbws configured to run that network.
It's also possible to make sbws stops after the first loop when being in a testing network so that it doesn't run forever.
While this won't behave the same way as in a public network, it might still help to find bugs.

Child Tickets

Change History (4)

comment:1 Changed 6 months ago by juga

Status: assignedneeds_review

https://github.com/torproject/sbws/pull/327

Until #28897 is merged, the test might stall.

comment:2 Changed 6 months ago by asn

Reviewer: dgoulet

comment:3 Changed 6 months ago by dgoulet

Status: needs_reviewmerge_ready

lgtm

comment:4 Changed 5 months ago by juga

Resolution: implemented
Status: merge_readyclosed

Merged.

Note: See TracTickets for help on using tickets.