You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2014/09/22 12:27:56 UTC

[15/31] git commit: [#7657] ticket:651 Cleanup after test to avoid tests freezing

[#7657] ticket:651 Cleanup after test to avoid tests freezing


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d140c44a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d140c44a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d140c44a

Branch: refs/heads/je/42cc_7657b
Commit: d140c44aa66643d99d5a0cdec4937cad3a61c64b
Parents: 6435972
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Sep 16 16:00:15 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Sep 22 11:14:56 2014 +0300

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_site_admin.py | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d140c44a/Allura/allura/tests/functional/test_site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_site_admin.py b/Allura/allura/tests/functional/test_site_admin.py
index 02436eb..0e454c8 100644
--- a/Allura/allura/tests/functional/test_site_admin.py
+++ b/Allura/allura/tests/functional/test_site_admin.py
@@ -398,6 +398,10 @@ class TestUserDetails(TestController):
         r = form.submit()
         assert_in(u'User disabled', self.webflash(r))
         assert_equal(M.User.by_username('test-user').disabled, True)
+        # don't leave user disabled, it causes tests to hang somewhere
+        user = M.User.by_username('test-user')
+        user.disabled = False
+        ThreadLocalORMSession.flush_all()
 
     def test_enable_user(self):
         user = M.User.by_username('test-user')
@@ -413,6 +417,7 @@ class TestUserDetails(TestController):
         assert_in(u'User enabled', self.webflash(r))
         assert_equal(M.User.by_username('test-user').disabled, False)
 
+
 @task
 def test_task(*args, **kw):
     """test_task doc string"""