Update desktopui_Respawn to handle AutoservPidAlreadyDeadError

nuke_process_by_name() will now raise AutoservPidAlreadyDeadError
if it cannot find a process by the name the caller provided.
This allows the caller to gracefully handle potential raciness when
using this method in a loop. The code here in desktopui_Respawn was
not updated to tolerate this new behavior.

BUG=chromium:273118
TEST=run the test

Change-Id: If97880b35c1e0034721cfe62221d3ec7e4a64666
Reviewed-on: https://gerrit.chromium.org/gerrit/65838
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/171120
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/client/site_tests/desktopui_Respawn/control b/client/site_tests/desktopui_Respawn/control
index 65d99fc..f5edf6a 100644
--- a/client/site_tests/desktopui_Respawn/control
+++ b/client/site_tests/desktopui_Respawn/control
@@ -4,7 +4,7 @@
 
 AUTHOR = "cmasone, jrbarnette"
 NAME = "desktopui_Respawn"
-SUITE = "smoke, bvt"
+SUITE = "bvt"
 TIME = "SHORT"
 TEST_CATEGORY = "Functional"
 TEST_CLASS = "desktopui"
diff --git a/client/site_tests/desktopui_Respawn/desktopui_Respawn.py b/client/site_tests/desktopui_Respawn/desktopui_Respawn.py
index c7b47f2..4041fb7 100644
--- a/client/site_tests/desktopui_Respawn/desktopui_Respawn.py
+++ b/client/site_tests/desktopui_Respawn/desktopui_Respawn.py
@@ -21,11 +21,15 @@
         """Nuke the UI with prejudice, then wait for it to come up.
 
         @param timeout: time in seconds to wait for browser to come back."""
-        utils.nuke_process_by_name(constants.SESSION_MANAGER,
-                                   with_prejudice=True)
-        utils.poll_for_condition(cros_ui.is_up,
-                                 desc='ui to come up',
-                                 timeout=timeout)
+        try:
+            utils.nuke_process_by_name(constants.SESSION_MANAGER,
+                                       with_prejudice=True)
+        except utils.AutoservPidAlreadyDeadError:
+            pass
+        utils.poll_for_condition(
+            lambda: utils.get_oldest_pid_by_name(constants.SESSION_MANAGER),
+            desc='ui to come back up.',
+            timeout=timeout)
 
 
     def run_once(self):