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/17 15:34:22 UTC
[35/35] 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/5927a21f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/5927a21f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/5927a21f
Branch: refs/heads/je/42cc_7657
Commit: 5927a21fbea5601659f99fdb3d9f86af21b2dd7a
Parents: 5d8c902
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Sep 16 16:00:15 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Sep 17 16:11:38 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/5927a21f/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 e4e42d8..ce7e47e 100644
--- a/Allura/allura/tests/functional/test_site_admin.py
+++ b/Allura/allura/tests/functional/test_site_admin.py
@@ -299,6 +299,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')
@@ -314,6 +318,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"""