From 6d06105e5059b0af9cd79849f9376bf058c48ec7 Mon Sep 17 00:00:00 2001 From: Patrick Huang Date: Thu, 17 Sep 2015 11:24:02 +1000 Subject: [PATCH] test: stabilize functional test by using RuleChain --- .../java/org/zanata/feature/security/SecurityTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java b/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java index dacd20190f..d202f190e1 100644 --- a/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java +++ b/functional-test/src/test/java/org/zanata/feature/security/SecurityTest.java @@ -24,6 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.junit.rules.RuleChain; import org.openqa.selenium.By; import org.subethamail.wiser.WiserMessage; import org.zanata.feature.Feature; @@ -46,15 +47,12 @@ */ @Category(DetailedTest.class) public class SecurityTest extends ZanataTestCase { - @Rule public HasEmailRule hasEmailRule = new HasEmailRule(); @Rule - public EnsureLogoutRule ensureLogoutRule = new EnsureLogoutRule(); - - @Rule - public AddUsersRule addUsersRule = new AddUsersRule(); + public RuleChain chain = RuleChain.outerRule(new AddUsersRule()) + .around(new EnsureLogoutRule()); @Feature(summary = "The user can log in", tcmsTestPlanIds = 5316, tcmsTestCaseIds = 86815)