From 0312625f4ae20f16bb8218ebc50258bc792a353c Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 21 Mar 2023 18:29:39 +0100 Subject: [PATCH] fix progress numbers for the case the API urlgetter tests re-run with Tor+Snowflake --- internal/experiment/riseupvpn/riseupvpn.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/internal/experiment/riseupvpn/riseupvpn.go b/internal/experiment/riseupvpn/riseupvpn.go index f0645e6c33..2086d9f823 100644 --- a/internal/experiment/riseupvpn/riseupvpn.go +++ b/internal/experiment/riseupvpn/riseupvpn.go @@ -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) } } @@ -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") }