Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py

Issue 1565001: test: Clean up site_login.py a bit. (Closed)
Patch Set: update one more call to attempt_logout() Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py
diff --git a/client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py b/client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py
index 4c27c42bf89c0c2e451132c5e7f04645967c1914..86ee057fd1bd441ebd5bcb7cf596b0b6618b608d 100644
--- a/client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py
+++ b/client/site_tests/login_LogoutProcessCleanup/login_LogoutProcessCleanup.py
@@ -79,8 +79,7 @@ class login_LogoutProcessCleanup(test.test):
# Require that we start the test logged in
if not logged_in:
- if not site_login.attempt_login(self, script):
- raise error.TestError('Could not login')
+ site_login.attempt_login(self, script)
# Start a process as chronos. This should get killed when logging out.
bg_job = utils.BgJob('su chronos -c "sleep 3600"')
@@ -93,8 +92,7 @@ class login_LogoutProcessCleanup(test.test):
raise error.TestFail('Expected to find processes owned by chronos '
'that were not started by the session manager while logged in.')
- if not site_login.attempt_logout():
- raise error.TestError('Could not logout')
+ site_login.attempt_logout()
logging.info('Logged out, searching for processes that should be dead')
@@ -115,5 +113,4 @@ class login_LogoutProcessCleanup(test.test):
# Reset the logged in state to how we started
if logged_in:
- if not site_login.attempt_login(self, script):
- raise error.TestError('Could not login')
+ site_login.attempt_login(self, script)

Powered by Google App Engine
This is Rietveld 408576698