Skip to content

Commit

Permalink
fix progress numbers for the case the API urlgetter tests re-run with…
Browse files Browse the repository at this point in the history
… Tor+Snowflake
  • Loading branch information
cyBerta committed Jun 29, 2023
1 parent 5a67be7 commit e3561a1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions internal/experiment/riseupvpn/riseupvpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ func (m Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error {
for i := range inputs {
inputs[i].Config.Tunnel = "torsf"
}
for entry := range multi.CollectOverall(ctx, inputs, 1, 20, "riseupvpn", callbacks) {

for entry := range multi.CollectOverall(ctx, inputs, 5, 20, "riseupvpn", callbacks) {
testkeys.UpdateProviderAPITestKeys(entry)
}
}
Expand All @@ -279,19 +280,25 @@ func (m Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error {
openvpnEndpoints := generateMultiInputs(gateways, "openvpn")
obfs4Endpoints := generateMultiInputs(gateways, "obfs4")
overallCount := 1 + len(inputs) + len(openvpnEndpoints) + len(obfs4Endpoints)
startCount := 1 + len(inputs)
if testkeys.APIStatus == "blocked" {
startCount += len(inputs)
overallCount += len(inputs)
}

// measure openvpn in parallel
for entry := range multi.CollectOverall(
ctx, openvpnEndpoints, 1+len(inputs), overallCount, "riseupvpn", callbacks) {
ctx, openvpnEndpoints, startCount, overallCount, "riseupvpn", callbacks) {
testkeys.AddGatewayConnectTestKeys(entry, "openvpn")
}

startCount += len(openvpnEndpoints)
// measure obfs4 in parallel
// TODO(bassosimone): when urlgetter is able to do obfs4 handshakes, here
// can possibly also test for the obfs4 handshake.
// See https://github.com/ooni/probe/issues/1463.
for entry := range multi.CollectOverall(
ctx, obfs4Endpoints, 1+len(inputs)+len(openvpnEndpoints), overallCount, "riseupvpn", callbacks) {
ctx, obfs4Endpoints, startCount, overallCount, "riseupvpn", callbacks) {
testkeys.AddGatewayConnectTestKeys(entry, "obfs4")
}

Expand Down

0 comments on commit e3561a1

Please sign in to comment.