From a7c7756289dbf4067e630fc69cd9ca41d2aedebc Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 10 Jan 2023 11:03:20 +0100
Subject: [PATCH] [T,nb] Remove cell timeout on notebook execution via
 testrunner.

Did more harm than good, overall timeouts are still handled by ctest
and pipeline.
---
 Tests/Data/Notebooks/testrunner.py    | 5 +----
 scripts/ci/jobs/jupyter.yml           | 2 +-
 scripts/cmake/test/NotebookTest.cmake | 9 ++-------
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/Tests/Data/Notebooks/testrunner.py b/Tests/Data/Notebooks/testrunner.py
index 2c0186145e2..bc45daa1fe6 100644
--- a/Tests/Data/Notebooks/testrunner.py
+++ b/Tests/Data/Notebooks/testrunner.py
@@ -71,9 +71,6 @@ parser.add_argument(
     "--hugo", action="store_true", help="Convert successful notebooks to web site."
 )
 parser.add_argument("--hugo-out", default="web", help="Hugo output directory.")
-parser.add_argument(
-    "--timeout", default="600", type=int, help="Cell execution timeout."
-)
 args = parser.parse_args()
 
 # Path setup
@@ -101,7 +98,7 @@ for notebook_file_path in args.notebooks:
 
         with open(notebook_file_path, mode="r", encoding="utf-8") as f:
             nb = nbformat.read(f, as_version=4)
-        ep = ExecutePreprocessor(timeout=args.timeout, kernel_name="python3")
+        ep = ExecutePreprocessor(kernel_name="python3")
 
         # 1. Run the notebook
         notebook_filename = os.path.basename(notebook_file_path)
diff --git a/scripts/ci/jobs/jupyter.yml b/scripts/ci/jobs/jupyter.yml
index f59ab7c1da5..d72753b0267 100644
--- a/scripts/ci/jobs/jupyter.yml
+++ b/scripts/ci/jobs/jupyter.yml
@@ -11,7 +11,7 @@ test notebooks via wheel:
     # TODO:
     #  - better timeout
     #  - run in parallel
-    - find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | xargs xvfb-run -a python Notebooks/testrunner.py --out _out --timeout 1200
+    - find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | xargs xvfb-run -a python Notebooks/testrunner.py --out _out
   artifacts:
     when: always
     paths:
diff --git a/scripts/cmake/test/NotebookTest.cmake b/scripts/cmake/test/NotebookTest.cmake
index f2346fa8238..1e8d71da36e 100644
--- a/scripts/cmake/test/NotebookTest.cmake
+++ b/scripts/cmake/test/NotebookTest.cmake
@@ -54,10 +54,7 @@ function(NotebookTest)
         )
     endif()
 
-    set(timeout ${ogs.ctest.large_runtime})
-    if(DEFINED NotebookTest_RUNTIME)
-        math(EXPR timeout "${NotebookTest_RUNTIME} * 10")
-    else()
+    if(NOT DEFINED NotebookTest_RUNTIME)
         set(NotebookTest_RUNTIME 1)
     endif()
 
@@ -79,9 +76,7 @@ function(NotebookTest)
 
     set(TEST_NAME "nb-${NotebookTest_DIR}/${NotebookTest_NAME_WE}")
 
-    set(_exe_args Notebooks/testrunner.py --hugo --out ${Data_BINARY_DIR}
-                  --timeout ${timeout}
-    )
+    set(_exe_args Notebooks/testrunner.py --hugo --out ${Data_BINARY_DIR})
     if(DEFINED ENV{CI})
         list(APPEND _exe_args --hugo-out ${PROJECT_BINARY_DIR}/web)
     endif()
-- 
GitLab