Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-11-18 22:40:50 +0000
committerRyan D. Brooks2010-11-18 22:40:50 +0000
commit4d71f60597dc7baf9226d9c60d183429fa8bfdda (patch)
treef5abf7135ce080a0a920072ce52de9c19e3288c9 /plugins
parent745d6fefa5e4ec2a01710a9b5993b24c1157fd44 (diff)
downloadorg.eclipse.osee-4d71f60597dc7baf9226d9c60d183429fa8bfdda.tar.gz
org.eclipse.osee-4d71f60597dc7baf9226d9c60d183429fa8bfdda.tar.xz
org.eclipse.osee-4d71f60597dc7baf9226d9c60d183429fa8bfdda.zip
refactor: Revome TestUtil isInTest/setInTest methods
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java1
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java9
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java6
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/Coverage_Db_Suite.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java2
-rw-r--r--plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java14
7 files changed, 4 insertions, 38 deletions
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
index a105f701650..d128b70ebc0 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
@@ -97,7 +97,6 @@ public class AtsBranchConfigurationTest {
throw new IllegalStateException("BranchConfigThroughTeamDefTest should not be run on production DB");
}
AtsBulkLoad.loadConfig(true);
- TestUtil.setIsInTest(true);
}
@org.junit.Test
@@ -424,7 +423,6 @@ public class AtsBranchConfigurationTest {
public void tearDown() throws Exception {
cleanupBranchTest(AtsTestBranches.BranchViaVersions);
cleanupBranchTest(AtsTestBranches.BranchViaTeamDef);
- TestUtil.setIsInTest(false);
}
public static void configureAts(String namespace, String teamDefName, Collection<String> versionNames, Collection<String> actionableItems, String workflowId) throws Exception {
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
index 7a3174c35f3..cd58c345b04 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
@@ -221,7 +221,6 @@ public class DemoTestUtil {
Assert.assertTrue(
"Authenticated user should be \"Joe Smith\" and is not. Check that Demo Application Server is being run.",
UserManager.getUser().getUserId().equals("Joe Smith"));
- TestUtil.setIsInTest(true);
} catch (OseeAuthenticationException ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
Assert.fail("Can't authenticate, either Demo Application Server is not running or Demo DbInit has not been performed");
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java
index 2a376c5bca6..2648ced184e 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java
@@ -21,9 +21,9 @@ import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
import org.eclipse.osee.support.test.util.DemoUsers;
import org.eclipse.osee.support.test.util.TestUtil;
-import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -37,7 +37,7 @@ public class MasterTestSuite_DemoDbInit {
public static void setup() throws Exception {
assertTrue("Demo Application Server must be running",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
- TestUtil.setIsInTest(true);
+ RenderingUtil.setPopupsAllowed(false);
}
@org.junit.Test
@@ -86,9 +86,4 @@ public class MasterTestSuite_DemoDbInit {
Assert.fail(Lib.exceptionToString(ex));
}
}
-
- @AfterClass
- public static void tearDown() throws Exception {
- TestUtil.setIsInTest(false);
- }
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
index ea5b1d70dda..daf45d70170 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.framework.skynet.core.test.FrameworkCore_Demo_Suite;
import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
import org.eclipse.osee.framework.ui.skynet.test.FrameworkUi_Demo_Suite;
import org.eclipse.osee.support.test.util.TestUtil;
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -52,11 +51,6 @@ public class MasterTestSuite_DemoDbTests {
assertTrue("Should be run on demo database.", TestUtil.isDemoDb());
RenderingUtil.setPopupsAllowed(false);
- TestUtil.setIsInTest(true);
}
- @AfterClass
- public static void tearDown() throws Exception {
- TestUtil.setIsInTest(false);
- }
}
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/Coverage_Db_Suite.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/Coverage_Db_Suite.java
index 7d536087d45..f9ed33849df 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/Coverage_Db_Suite.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/Coverage_Db_Suite.java
@@ -18,8 +18,8 @@ import org.eclipse.osee.coverage.test.model.CoverageUnitPersistTest;
import org.eclipse.osee.coverage.test.model.DbTestUnitProviderTest;
import org.eclipse.osee.coverage.test.model.TestUnitStoreTest;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
import org.eclipse.osee.support.test.util.TestUtil;
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -51,11 +51,7 @@ public class Coverage_Db_Suite {
"Client must authenticate using lba protocol",
ClientSessionManager.getSession().getAuthenticationProtocol().equals("lba") || ClientSessionManager.getSession().getAuthenticationProtocol().equals(
"demo"));
- TestUtil.setIsInTest(true);
+ RenderingUtil.setPopupsAllowed(false);
}
- @AfterClass
- public static void tearDown() throws Exception {
- TestUtil.setIsInTest(false);
- }
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
index c8e2f2fa3d7..55e32b39327 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
@@ -57,8 +57,6 @@ public class WordEditTest {
assertFalse("Not to be run on production datbase.", TestUtil.isProductionDb());
FrameworkTestUtil.cleanupSimpleTest(BranchManager.getBranch(DemoSawBuilds.SAW_Bld_1), getClass().getSimpleName());
RenderingUtil.setPopupsAllowed(false);
- // this will keep word file edit popup from displaying at end of tests
- TestUtil.setIsInTest(true);
}
@org.junit.Test
diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
index e5eb4594946..8d566e83cec 100644
--- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
+++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java
@@ -44,20 +44,6 @@ public class TestUtil {
return DEMO_DB_TYPE.equals(OseeInfo.getCachedValue(OseeInfo.DB_TYPE_KEY));
}
- /**
- * Need to match methods in OseeProperties
- */
- public static boolean isInTest() {
- return Boolean.valueOf(System.getProperty("osee.isInTest"));
- }
-
- /**
- * Need to match methods in OseeProperties
- */
- public static void setIsInTest(boolean isInTest) {
- System.setProperty("osee.isInTest", String.valueOf(isInTest));
- }
-
public static void sleep(long milliseconds) throws Exception {
System.out.println("Sleeping " + milliseconds);
Thread.sleep(milliseconds);

Back to the top