diff --git a/src/native/watchdog/watchdog.cpp b/src/native/watchdog/watchdog.cpp
index fec9674cd2836..2ab508a5fb53c 100644
--- a/src/native/watchdog/watchdog.cpp
+++ b/src/native/watchdog/watchdog.cpp
@@ -35,8 +35,11 @@ int main(const int argc, const char *argv[])
return EXIT_FAILURE;
}
- const long timeout_ms = strtol(argv[1], nullptr, 10);
- int exit_code = run_timed_process(timeout_ms, argc-2, &argv[2]);
+ // Due to how Helix test environment variables are set, we have to receive
+ // the raw timeout value in minutes. Then we convert it to milliseconds when
+ // calling run_timed_process().
+ const long timeout_mins = strtol(argv[1], nullptr, 10);
+ int exit_code = run_timed_process(timeout_mins * 60000L, argc-2, &argv[2]);
printf("App Exit Code: %d\n", exit_code);
return exit_code;
diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets
index 0623040dc12d8..89e893539e69d 100644
--- a/src/tests/Common/CLRTest.Execute.Bash.targets
+++ b/src/tests/Common/CLRTest.Execute.Bash.targets
@@ -290,7 +290,7 @@ fi
"$CORE_ROOT/corerun" $(CoreRunArgs) ${__DotEnvArg}
- "$CORE_ROOT/watchdog" $_WatcherTimeoutMilliseconds
+ "$CORE_ROOT/watchdog" $_WatcherTimeoutMins
1 ))%3B then
+ _WatcherTimeoutMins="%24((_WatcherTimeoutMins-1))"
+fi
# The __TestEnv variable may be used to specify a script to source before the test.
if [ -n "$__TestEnv" ]%3B then
diff --git a/src/tests/Common/CLRTest.Execute.Batch.targets b/src/tests/Common/CLRTest.Execute.Batch.targets
index 605bc77b6963c..7ae089a0ae72e 100644
--- a/src/tests/Common/CLRTest.Execute.Batch.targets
+++ b/src/tests/Common/CLRTest.Execute.Batch.targets
@@ -298,7 +298,7 @@ if defined DoLink (
"%CORE_ROOT%\corerun.exe" $(CoreRunArgs) %__DotEnvArg%
- "%CORE_ROOT%\watchdog.exe" %_WatcherTimeoutMilliseconds%
+ "%CORE_ROOT%\watchdog.exe" %_WatcherTimeoutMins%
+
@@ -676,6 +677,7 @@
+