From 6db2ea4b6d8c47f8354481e9542b784bf1d6c455 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 15 Nov 2021 12:52:33 +0100 Subject: [PATCH] [backport] fix(psiphon): increase the maximum runtime to 300s (#596) (#597) This diff backports c527ca1f613ed60161a2fec712c092acecf861f7. Here's the original commit message: - - - See: https://github.com/ooni/probe/issues/1856. This diff will need to be backported to release/3.11. --- internal/engine/experiment/psiphon/psiphon.go | 4 ++-- internal/engine/experiment/psiphon/psiphon_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/engine/experiment/psiphon/psiphon.go b/internal/engine/experiment/psiphon/psiphon.go index 30173108ea..79b42d8556 100644 --- a/internal/engine/experiment/psiphon/psiphon.go +++ b/internal/engine/experiment/psiphon/psiphon.go @@ -16,7 +16,7 @@ import ( const ( testName = "psiphon" - testVersion = "0.5.0" + testVersion = "0.5.1" ) // Config contains the experiment's configuration. @@ -70,7 +70,7 @@ func (m *Measurer) Run( ctx context.Context, sess model.ExperimentSession, measurement *model.Measurement, callbacks model.ExperimentCallbacks, ) error { - const maxruntime = 60 + const maxruntime = 300 ctx, cancel := context.WithTimeout(ctx, maxruntime*time.Second) var ( wg sync.WaitGroup diff --git a/internal/engine/experiment/psiphon/psiphon_test.go b/internal/engine/experiment/psiphon/psiphon_test.go index de7c8aa9c3..8ab004e486 100644 --- a/internal/engine/experiment/psiphon/psiphon_test.go +++ b/internal/engine/experiment/psiphon/psiphon_test.go @@ -23,7 +23,7 @@ func TestNewExperimentMeasurer(t *testing.T) { if measurer.ExperimentName() != "psiphon" { t.Fatal("unexpected name") } - if measurer.ExperimentVersion() != "0.5.0" { + if measurer.ExperimentVersion() != "0.5.1" { t.Fatal("unexpected version") } }