[dart] Timeout observatory tests after 5 minutes on 3xHEAD recipe

These tests usually finish in seconds, but are prone to hang forever.

Change-Id: If3d11f07ea52181374b7b6b18dc83b3f0c96ccec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1525941
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
diff --git a/scripts/slave/README.recipes.md b/scripts/slave/README.recipes.md
index 60c4dde..68b6eab 100644
--- a/scripts/slave/README.recipes.md
+++ b/scripts/slave/README.recipes.md
@@ -5107,7 +5107,7 @@
 
 &mdash; **def [Build](/scripts/slave/recipes/dart/flutter_engine.py#41)(api, checkout_dir, config, \*targets):**
 
-&mdash; **def [BuildAndTest](/scripts/slave/recipes/dart/flutter_engine.py#291)(api, start_dir, checkout_dir, flutter_rev):**
+&mdash; **def [BuildAndTest](/scripts/slave/recipes/dart/flutter_engine.py#292)(api, start_dir, checkout_dir, flutter_rev):**
 
 &mdash; **def [BuildLinux](/scripts/slave/recipes/dart/flutter_engine.py#90)(api, checkout_dir):**
 
@@ -5115,9 +5115,9 @@
 
 &mdash; **def [BuildLinuxAndroidx86](/scripts/slave/recipes/dart/flutter_engine.py#68)(api, checkout_dir):**
 
-&mdash; **def [CopyArtifacts](/scripts/slave/recipes/dart/flutter_engine.py#164)(api, engine_src, cached_dest, file_paths):**
+&mdash; **def [CopyArtifacts](/scripts/slave/recipes/dart/flutter_engine.py#165)(api, engine_src, cached_dest, file_paths):**
 
-&mdash; **def [GetCheckout](/scripts/slave/recipes/dart/flutter_engine.py#111)(api):**
+&mdash; **def [GetCheckout](/scripts/slave/recipes/dart/flutter_engine.py#112)(api):**
 
 &mdash; **def [KillTasks](/scripts/slave/recipes/dart/flutter_engine.py#33)(api, checkout_dir, ok_ret='any'):**
 
@@ -5125,15 +5125,15 @@
 
 &mdash; **def [RunGN](/scripts/slave/recipes/dart/flutter_engine.py#50)(api, checkout_dir, \*args):**
 
-&mdash; **def [RunSteps](/scripts/slave/recipes/dart/flutter_engine.py#267)(api):**
+&mdash; **def [RunSteps](/scripts/slave/recipes/dart/flutter_engine.py#268)(api):**
 
 &mdash; **def [TestEngine](/scripts/slave/recipes/dart/flutter_engine.py#63)(api, checkout_dir):**
 
-&mdash; **def [TestFlutter](/scripts/slave/recipes/dart/flutter_engine.py#236)(api, start_dir, just_built_dart_sdk):**
+&mdash; **def [TestFlutter](/scripts/slave/recipes/dart/flutter_engine.py#237)(api, start_dir, just_built_dart_sdk):**
 
 &mdash; **def [TestObservatory](/scripts/slave/recipes/dart/flutter_engine.py#101)(api, checkout_dir):**
 
-&mdash; **def [UpdateCachedEngineArtifacts](/scripts/slave/recipes/dart/flutter_engine.py#177)(api, flutter, engine_src):**
+&mdash; **def [UpdateCachedEngineArtifacts](/scripts/slave/recipes/dart/flutter_engine.py#178)(api, flutter, engine_src):**
 ### *recipes* / [dart/forward\_branch](/scripts/slave/recipes/dart/forward_branch.py)
 
 [DEPS](/scripts/slave/recipes/dart/forward_branch.py#8): [dart](#recipe_modules-dart), [depot\_tools/git][depot_tools/recipe_modules/git], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
diff --git a/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux-buildbot.json b/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux-buildbot.json
index 7c7e8d9..81cf175 100644
--- a/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux-buildbot.json
+++ b/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux-buildbot.json
@@ -1238,7 +1238,8 @@
       "GOMA_DIR": "[CACHE]/goma/client",
       "PATH": "[START_DIR]/src/third_party/dart/tools/sdks/dart-sdk/bin:<PATH>"
     },
-    "name": "test observatory and service protocol"
+    "name": "test observatory and service protocol",
+    "timeout": 300
   },
   {
     "cmd": [
diff --git a/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux.json b/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux.json
index f3a3254..e5d4265 100644
--- a/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux.json
+++ b/scripts/slave/recipes/dart/flutter_engine.expected/flutter-engine-linux.json
@@ -1304,7 +1304,8 @@
       "GOMA_DIR": "[CACHE]/goma/client",
       "PATH": "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin:<PATH>"
     },
-    "name": "test observatory and service protocol"
+    "name": "test observatory and service protocol",
+    "timeout": 300
   },
   {
     "cmd": [
diff --git a/scripts/slave/recipes/dart/flutter_engine.py b/scripts/slave/recipes/dart/flutter_engine.py
index 88ab3f1..576e240 100644
--- a/scripts/slave/recipes/dart/flutter_engine.py
+++ b/scripts/slave/recipes/dart/flutter_engine.py
@@ -105,7 +105,8 @@
   test_path = checkout_dir.join('flutter/shell/testing/observatory/test.dart')
   test_cmd = ['dart', test_path, flutter_tester_path, empty_main_path]
   with api.context(cwd=checkout_dir):
-    api.step('test observatory and service protocol', test_cmd)
+    # Timeout after 5 minutes, this step is prone to hang
+    api.step('test observatory and service protocol', test_cmd, timeout=5*60)
 
 
 def GetCheckout(api):