Skip to content

Commit

Permalink
Fix timeout for unatted tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Dec 12, 2023
1 parent 3b27a17 commit 3a77bc8
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,16 @@ private void downloadURLs() {

currentTest.setInputs(inputs);

if (currentTest.getMax_runtime() == null)
currentTest.setMax_runtime(app.getPreferenceManager().getMaxRuntime());
/*
* Set the maximum runtime if the test doesn't yet have it.This is only done if the test is not unattended.
* Previously, this was not required, because the code path for unattended tests
* did not call this method. However, now that we are using the same code path as of https://github.com/ooni/probe-android/pull/572,
* This is now required to ensure the manual tests follow the preference set by the user,
* while the unattended tests doesn't.
*/
if (currentTest.getMax_runtime() == null && !unattended) {
currentTest.setMax_runtime(app.getPreferenceManager().getMaxRuntime());
}
publishProgress(URL);
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 3a77bc8

Please sign in to comment.