autotest: desktopui_ExitOnSupervisedUserCrash race fix

At the end of the desktopui_ExitOnSupervisedUserCrash, I was waiting
for a signal that the user session had ended while accidentally also
causing the UI to get torn down. This resulted in an unclean UI shutdown
that never sent the signal I wanted to see, so the test failed with
a timeout exception.

This change moves the listening for the session termination signal
so we properly wait for it before tearing down the UI.


Change-Id: Ied242e6fe711a78586a356666a73c75d71fb93ad
Trybot-Ready: Chris Masone <>
(cherry picked from commit 3e5df182dffdaee9c320bded819239e23d9eb16b)
Reviewed-by: Yuly Novikov <>
Commit-Queue: Yuly Novikov <>
Tested-by: Yuly Novikov <>
1 file changed