Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-05-13 23:20:42 +0000
committerRyan D. Brooks2011-05-13 23:20:42 +0000
commita128581bcf59c07e65fe13d37d26e1d9da4bcbb6 (patch)
treef23ded5264f686bce62bb505352ea734b473a251 /plugins
parent79c6eb098448608c1cb77132ebf906b3544680b1 (diff)
downloadorg.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.tar.gz
org.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.tar.xz
org.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.zip
refactor: Cleanup logging
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbUtil.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionFactory.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Config_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Access_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Column_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_StateItem_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Production_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/Review_Demo_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java70
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CustomizeDemoTableTestUtil.java10
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/NavigateTestUtil.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java3
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_DemoIntegrationSuite.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/CoreRuntimeFeatureTestsSuite.java7
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbInit.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/MasterTestSuite_DemoDbTests.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java7
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java5
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeManager.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java9
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AllAccessTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/FrameworkCoreTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/enums/EnumsTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/exception/ExceptionTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/internal/InternalCoreTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/ops/OpsTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java5
-rw-r--r--plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/test/DatabaseTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/JdkCoreTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/rules/JdkCoreRuleTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/JdkCoreUtilTestSuite.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/IoTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/xml/IoXmlTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java16
-rw-r--r--plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/AllSearchEngineTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/attribute/AttributeTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/InternalTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/search/InternalSearchTestSuite.java8
-rw-r--r--plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/language/LanguageTestSuite.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Demo_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Production_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java62
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java7
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/InterArtifactDropTest.java4
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/model/ModelFinderService.java19
-rw-r--r--plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/TestUtil.java29
55 files changed, 339 insertions, 152 deletions
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbUtil.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbUtil.java
index 323d608ad9a..4ea78b1c759 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbUtil.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbUtil.java
@@ -59,13 +59,11 @@ public class DemoDbUtil {
}
public static void sleep(long milliseconds) throws OseeCoreException {
- OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Sleeping " + milliseconds);
try {
Thread.sleep(milliseconds);
} catch (Exception ex) {
OseeExceptions.wrapAndThrow(ex);
}
- OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Awake");
}
public static Result isDbPopulatedWithDemoData(Branch branch) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionFactory.java
index 473d1382ae3..ceb151fcdbb 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionFactory.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.workflow.ITeamWorkflowProvider;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -81,7 +82,10 @@ public class WorkDefinitionFactory {
match = WorkDefinitionFactoryLegacyMgr.getWorkFlowDefinitionFromReverseId(id);
}
if (match.isMatched()) {
- System.out.println("Loaded " + match);
+ if (!OseeProperties.isInTest()) {
+ OseeLog.log(Activator.class, Level.INFO, null, "Loaded Work Definition [%s]", match);
+ System.out.println();
+ }
workDefIdToWorkDefintion.put(id, match);
}
}
@@ -228,7 +232,7 @@ public class WorkDefinitionFactory {
String overrideId = WorkDefinitionFactoryLegacyMgr.getOverrideId(id);
if (Strings.isValid(overrideId)) {
// Only display this override once in log
- if (!errorDisplayed.contains(overrideId)) {
+ if (!errorDisplayed.contains(overrideId) && !OseeProperties.isInTest()) {
OseeLog.log(Activator.class, Level.INFO,
String.format("Override WorkDefinition [%s] with [%s]", id, overrideId));
errorDisplayed.add(overrideId);
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Config_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Config_Suite.java
index d17daf0f23c..17d7a0d0b58 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Config_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Config_Suite.java
@@ -17,6 +17,8 @@ import org.eclipse.osee.ats.config.copy.CopyAtsConfigurationOperationTest;
import org.eclipse.osee.ats.config.copy.CopyAtsUtilTest;
import org.eclipse.osee.ats.config.copy.CopyAtsValidationTest;
import org.eclipse.osee.ats.workflow.AtsWorkItemDefinitionTest;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -35,5 +37,8 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
public class AtsTest_Config_Suite {
- // test provided above
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Access_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Access_Suite.java
index 088b4e03644..b971b3ae125 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Access_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Access_Suite.java
@@ -11,6 +11,8 @@
package org.eclipse.osee.ats;
import org.eclipse.osee.ats.access.AtsBranchAccessManagerTest;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,5 +22,8 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
public class AtsTest_Demo_Access_Suite {
- // Tests listed above
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Column_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Column_Suite.java
index be0cb10ca89..714e965243d 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Column_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Column_Suite.java
@@ -34,6 +34,7 @@ import org.eclipse.osee.ats.column.TargetedVersionColumnTest;
import org.eclipse.osee.ats.column.TeamColumnTest;
import org.eclipse.osee.ats.column.TypeColumnTest;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -68,6 +69,7 @@ import org.junit.runners.Suite;
public class AtsTest_Demo_Column_Suite {
@BeforeClass
public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
assertTrue("Client must authenticate using demo protocol",
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_StateItem_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_StateItem_Suite.java
index af64dcc90d3..f9e945f83aa 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_StateItem_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_StateItem_Suite.java
@@ -16,6 +16,8 @@ import org.eclipse.osee.ats.editor.stateItem.AtsForceAssigneesToTeamLeadsStateIt
import org.eclipse.osee.ats.editor.stateItem.AtsHandleAddReviewRuleStateItemTest;
import org.eclipse.osee.ats.editor.stateItem.AtsPeerToPeerReviewPrepareStateItemTest;
import org.eclipse.osee.ats.editor.stateItem.AtsPeerToPeerReviewReviewStateItemTest;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -33,5 +35,8 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
public class AtsTest_Demo_StateItem_Suite {
- // test provided above
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
index e32b4df1dbd..08cbd979366 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Demo_Suite.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.ats.util.AtsXWidgetsExampleBlamTest;
import org.eclipse.osee.ats.util.ImportActionsViaSpreadsheetTest;
import org.eclipse.osee.ats.workflow.SMAPromptChangeStatusTest;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -62,6 +63,7 @@ import org.junit.runners.Suite;
public class AtsTest_Demo_Suite {
@BeforeClass
public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
assertTrue("Client must authenticate using demo protocol",
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Production_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Production_Suite.java
index 6d3ca5575b7..866a1788ec3 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Production_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/AtsTest_Production_Suite.java
@@ -11,6 +11,8 @@
package org.eclipse.osee.ats;
import org.eclipse.osee.ats.util.AtsImageTest;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,5 +22,8 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
public class AtsTest_Production_Suite {
- // test provided above
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/Review_Demo_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/Review_Demo_Suite.java
index bccde83cfe6..661144b59c9 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/Review_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/Review_Demo_Suite.java
@@ -12,6 +12,8 @@ package org.eclipse.osee.ats;
import org.eclipse.osee.ats.review.ReviewNavigateItemsToWorldViewTest;
import org.eclipse.osee.ats.review.ReviewWorldSearchItemDemoTest;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,8 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
public class Review_Demo_Suite {
- // test provided above
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
index b113b7c493d..6b5b5d02c70 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/config/AtsBranchConfigurationTest.java
@@ -72,6 +72,7 @@ public class AtsBranchConfigurationTest {
"BranchViaTeamDef");
public static final IOseeBranch BRANCH_VIA_VERSIONS = TokenFactory.createBranch("AyH_e6damwQgvDhKfBBB",
"BranchViaVersions");
+ private final boolean DEBUG = false;
private static Collection<String> appendToName(IOseeBranch branch, String... postFixes) {
Collection<String> data = new ArrayList<String>();
@@ -95,12 +96,16 @@ public class AtsBranchConfigurationTest {
@org.junit.Test
public void testBranchViaVersions() throws Exception {
- OseeLog.log(AtsPlugin.class, Level.INFO, "Running testBranchViaVersions...");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Running testBranchViaVersions...");
+ }
// Cleanup from previous run
cleanupBranchTest(BRANCH_VIA_VERSIONS);
- OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring ATS for team org.branchTest.viaTeamDefs");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring ATS for team org.branchTest.viaTeamDefs");
+ }
// create team definition and actionable item
String name = BRANCH_VIA_VERSIONS.getName();
@@ -110,14 +115,18 @@ public class AtsBranchConfigurationTest {
configureAts(namespace, name, versions, actionableItems);
// create main branch
- OseeLog.log(AtsPlugin.class, Level.INFO, "Creating root branch");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Creating root branch");
+ }
// Create SAW_Bld_2 branch off SAW_Bld_1
Branch viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_VERSIONS);
TestUtil.sleep(2000);
// configure version to use branch and allow create/commit
- OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring version to use branch and allow create/commit");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring version to use branch and allow create/commit");
+ }
TeamDefinitionArtifact teamDef =
(TeamDefinitionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.TeamDefinition,
BRANCH_VIA_VERSIONS.getName(), AtsUtil.getAtsBranch());
@@ -136,7 +145,9 @@ public class AtsBranchConfigurationTest {
TestUtil.sleep(2000);
// create action and target for version
- OseeLog.log(AtsPlugin.class, Level.INFO, "Create new Action and target for version " + verArtToTarget);
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Create new Action and target for version " + verArtToTarget);
+ }
Collection<ActionableItemArtifact> selectedActionableItems =
ActionableItemManagerCore.getActionableItems(appendToName(BRANCH_VIA_VERSIONS, "A1"));
@@ -156,7 +167,9 @@ public class AtsBranchConfigurationTest {
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf);
// Transition to desired state
- OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
+ }
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Branch Configuration Test");
dtwm.transitionTo(TeamState.Implement, null, false, transaction);
@@ -169,7 +182,9 @@ public class AtsBranchConfigurationTest {
createBranch(namespace, teamWf);
// make changes
- OseeLog.log(AtsPlugin.class, Level.INFO, "Make new requirement artifact");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Make new requirement artifact");
+ }
Artifact rootArtifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(teamWf.getWorkingBranch());
Artifact blk3MainArt =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, teamWf.getWorkingBranch(),
@@ -183,7 +198,9 @@ public class AtsBranchConfigurationTest {
TestUtil.sleep(2000);
// test change report
- OseeLog.log(AtsPlugin.class, Level.INFO, "Test change report results");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Test change report results");
+ }
ChangeData changeData = AtsBranchManager.getChangeDataFromEarliestTransactionId(teamWf);
Assert.assertFalse("No changes detected", changeData.isEmpty());
@@ -195,13 +212,17 @@ public class AtsBranchConfigurationTest {
@org.junit.Test
public void testBranchViaTeamDefinition() throws Exception {
- OseeLog.log(AtsPlugin.class, Level.INFO, "Running testBranchViaTeamDefinition...");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Running testBranchViaTeamDefinition...");
+ }
// Cleanup from previous run
cleanupBranchTest(BRANCH_VIA_TEAM_DEFINITION);
- OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring ATS for team org.branchTest.viaTeamDefs");
- // create team definition and actionable item
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring ATS for team org.branchTest.viaTeamDefs");
+ // create team definition and actionable item
+ }
String name = BRANCH_VIA_TEAM_DEFINITION.getName();
String namespace = asNamespace(BRANCH_VIA_TEAM_DEFINITION);
@@ -210,14 +231,18 @@ public class AtsBranchConfigurationTest {
configureAts(namespace, name, versions, actionableItems);
// create main branch
- OseeLog.log(AtsPlugin.class, Level.INFO, "Creating root branch");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Creating root branch");
+ }
// Create SAW_Bld_2 branch off SAW_Bld_1
Branch viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_TEAM_DEFINITION);
TestUtil.sleep(2000);
// configure team def to use branch
- OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring team def to use branch and allow create/commit");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Configuring team def to use branch and allow create/commit");
+ }
TeamDefinitionArtifact teamDef =
(TeamDefinitionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.TeamDefinition,
BRANCH_VIA_TEAM_DEFINITION.getName(), AtsUtil.getAtsBranch());
@@ -231,7 +256,9 @@ public class AtsBranchConfigurationTest {
TestUtil.sleep(2000);
// create action,
- OseeLog.log(AtsPlugin.class, Level.INFO, "Create new Action");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Create new Action");
+ }
Collection<ActionableItemArtifact> selectedActionableItems =
ActionableItemManagerCore.getActionableItems(appendToName(BRANCH_VIA_TEAM_DEFINITION, "A1"));
Assert.assertFalse(selectedActionableItems.isEmpty());
@@ -248,7 +275,9 @@ public class AtsBranchConfigurationTest {
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf);
// Transition to desired state
- OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
+ }
transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "Test branch via team definition: Transition to desired state");
dtwm.transitionTo(TeamState.Implement, null, false, transaction);
@@ -259,7 +288,9 @@ public class AtsBranchConfigurationTest {
createBranch(namespace, teamWf);
// make changes
- OseeLog.log(AtsPlugin.class, Level.INFO, "Make new requirement artifact");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Make new requirement artifact");
+ }
Artifact rootArtifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(teamWf.getWorkingBranch());
Artifact blk3MainArt =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, teamWf.getWorkingBranch(),
@@ -271,7 +302,9 @@ public class AtsBranchConfigurationTest {
commitBranch(teamWf);
// test change report
- OseeLog.log(AtsPlugin.class, Level.INFO, "Test change report results");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "Test change report results");
+ }
ChangeData changeData = AtsBranchManager.getChangeDataFromEarliestTransactionId(teamWf);
Assert.assertTrue("No changes detected", !changeData.isEmpty());
@@ -281,7 +314,6 @@ public class AtsBranchConfigurationTest {
public static void cleanupBranchTest(IOseeBranch branch) throws Exception {
String namespace = "org.branchTest." + branch.getName().toLowerCase();
- OseeLog.log(AtsPlugin.class, Level.INFO, "Cleanup from previous run of ATS for team " + namespace);
Artifact aArt =
ArtifactQuery.checkArtifactFromTypeAndName(AtsArtifactTypes.Action, branch.getName() + " Req Changes",
AtsUtil.getAtsBranch());
@@ -361,7 +393,6 @@ public class AtsBranchConfigurationTest {
}
public static void commitBranch(TeamWorkFlowArtifact teamWf) throws Exception {
- OseeLog.log(AtsPlugin.class, Level.INFO, "Commit Branch");
Job job =
AtsBranchManager.commitWorkingBranch(teamWf, false, true,
AtsBranchManagerCore.getWorkingBranch(teamWf).getParentBranch(), true);
@@ -373,7 +404,6 @@ public class AtsBranchConfigurationTest {
}
public static void createBranch(String namespace, TeamWorkFlowArtifact teamWf) throws Exception {
- OseeLog.log(AtsPlugin.class, Level.INFO, "Creating working branch");
String implementPageId = namespace + ".Implement";
Result result = AtsBranchManager.createWorkingBranch(teamWf, implementPageId, false);
if (result.isFalse()) {
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CustomizeDemoTableTestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CustomizeDemoTableTestUtil.java
index dd46f1d15de..f942a49ad57 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CustomizeDemoTableTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/CustomizeDemoTableTestUtil.java
@@ -23,6 +23,8 @@ import org.eclipse.swt.widgets.Control;
*/
public class CustomizeDemoTableTestUtil extends XViewerCustomizeDialog {
+ public boolean DEBUG = false;
+
public CustomizeDemoTableTestUtil(XViewer viewer) {
super(viewer);
}
@@ -32,7 +34,9 @@ public class CustomizeDemoTableTestUtil extends XViewerCustomizeDialog {
*/
@Override
public Control createDialogArea(Composite parent) {
- OseeLog.log(AtsPlugin.class, Level.INFO, "===> Simulating CustomizationView " + "\"...");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "===> Simulating CustomizationView " + "\"...");
+ }
return super.createDialogArea(parent);
}
@@ -40,7 +44,9 @@ public class CustomizeDemoTableTestUtil extends XViewerCustomizeDialog {
* for testing purposes - simulate the add all button click
*/
public void handleAddAllItemButtonClick() {
- OseeLog.log(AtsPlugin.class, Level.INFO, "===> Simulating CustomizationView Add All Columns" + "\"...");
+ if (DEBUG) {
+ OseeLog.log(AtsPlugin.class, Level.INFO, "===> Simulating CustomizationView Add All Columns" + "\"...");
+ }
super.handleAddAllItem();
super.handleLoadConfigCust();
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/NavigateTestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/NavigateTestUtil.java
index a3af8256045..2a7f680d18a 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/NavigateTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/util/NavigateTestUtil.java
@@ -115,8 +115,6 @@ public final class NavigateTestUtil {
public static void compare(int expectedNumOfType, int actualNumOfType, String expectedStr) {
if (expectedNumOfType != actualNumOfType) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, expectedStr, null);
- } else {
- OseeLog.log(AtsPlugin.class, Level.INFO, expectedStr);
}
Assert.assertTrue(expectedStr, actualNumOfType == expectedNumOfType);
}
@@ -124,8 +122,6 @@ public final class NavigateTestUtil {
public static void compare(boolean expectedCond, boolean actualCond, String expectedStr) {
if (expectedCond != actualCond) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, expectedStr, null);
- } else {
- OseeLog.log(AtsPlugin.class, Level.INFO, expectedStr);
}
Assert.assertTrue(expectedStr, expectedCond == actualCond);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index f59c68673f4..5b9d4679a69 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -76,7 +76,6 @@ import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
-import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
@@ -159,9 +158,9 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
List<Collection<Integer>> artIdLists = null;
// Un-comment to process whole Common branch - Normal Mode
- ElapsedTime elapsedTime = new ElapsedTime("ValidateAtsDatabase - load ArtIds");
+ // ElapsedTime elapsedTime = new ElapsedTime("ValidateAtsDatabase - load ArtIds");
artIdLists = loadAtsBranchArtifactIds(xResultData, monitor);
- elapsedTime.end();
+ // elapsedTime.end();
// Un-comment to process specific artifact from common - Test Mode
// artIdLists = Arrays.asList((Collection<Integer>) Arrays.asList(new Integer(524575)));
@@ -178,11 +177,11 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
int artSetNum = 1;
for (Collection<Integer> artIdList : artIdLists) {
// Don't process all lists if just trying to test this report
- elapsedTime =
- new ElapsedTime(String.format("ValidateAtsDatabase - load Artifact set %d/%d", artSetNum++,
- artIdLists.size()));
+ // elapsedTime =
+ // new ElapsedTime(String.format("ValidateAtsDatabase - load Artifact set %d/%d", artSetNum++,
+ // artIdLists.size()));
Collection<Artifact> artifacts = ArtifactQuery.getArtifactListFromIds(artIdList, AtsUtil.getAtsBranch());
- elapsedTime.end();
+ // elapsedTime.end();
count += artifacts.size();
testArtifactIds(artifacts);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
index 4e255b3ddc1..64139be4751 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
@@ -86,8 +86,7 @@ public final class AtsWorkDefinitionSheetProviders {
public static void importWorkDefinitionSheets(XResultData resultData, boolean onlyWorkDefinitions, SkynetTransaction transaction, Artifact folder, Collection<WorkDefinitionSheet> sheets) throws OseeCoreException {
for (WorkDefinitionSheet sheet : sheets) {
if (isValidSheet(sheet)) {
- String logStr = String.format("Importing ATS sheet [%s]", sheet.getName());
- System.out.println(logStr);
+ OseeLog.log(AtsPlugin.class, Level.INFO, null, "Importing ATS sheet [%s]", sheet.getName());
Artifact artifact =
AtsWorkDefinitionProvider.get().importWorkDefinitionSheetToDb(sheet, resultData, onlyWorkDefinitions,
transaction);
@@ -104,8 +103,7 @@ public final class AtsWorkDefinitionSheetProviders {
new SkynetTransaction(AtsUtil.getAtsBranch(), "Import ATS AIs and Team Definitions");
for (WorkDefinitionSheet sheet : getWorkDefinitionSheets()) {
if (isValidSheet(sheet)) {
- String logStr = String.format("Importing ATS AIs and Teams sheet [%s]", sheet.getName());
- OseeLog.log(AtsPlugin.class, Level.INFO, logStr);
+ OseeLog.log(AtsPlugin.class, Level.INFO, null, "Importing ATS AIs and Teams sheet [%s]", sheet.getName());
AtsWorkDefinitionProvider.get().importAIsAndTeamsToDb(sheet, transaction);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
index 2d57d9f89ab..02d333c1711 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
@@ -58,7 +58,6 @@ public class ImportAIsAndTeamDefinitionsToDb {
public void importUserDefinitions(EList<UserDef> userDefs) throws OseeCoreException {
for (UserDef dslUserDef : userDefs) {
String dslUserName = Strings.unquote(dslUserDef.getName());
- System.out.println(" - Importing User " + dslUserName);
Artifact userArt = null;
if (dslUserDef.getUserDefOption().contains("GetOrCreate")) {
userArt = UserManager.createUser(getOseeUser(dslUserDef), transaction);
@@ -103,7 +102,7 @@ public class ImportAIsAndTeamDefinitionsToDb {
public void importTeamDefinitions(EList<TeamDef> teamDefs, Artifact parentArtifact) throws OseeCoreException {
for (TeamDef dslTeamDef : teamDefs) {
String dslTeamName = Strings.unquote(dslTeamDef.getName());
- System.out.println(" - Importing Team " + dslTeamName);
+ // System.out.println(" - Importing Team " + dslTeamName);
Artifact newTeam = null;
if (dslTeamDef.getTeamDefOption().contains("GetOrCreate")) {
newTeam = getOrCreate(dslTeamName, true, parentArtifact);
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_DemoIntegrationSuite.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_DemoIntegrationSuite.java
index 1cdecde673d..6af3bd613c4 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_DemoIntegrationSuite.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_DemoIntegrationSuite.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.client.integration.tests;
import java.util.logging.Level;
import org.eclipse.osee.client.integration.tests.suite.MasterTestSuite_DemoDbInit;
import org.eclipse.osee.client.integration.tests.suite.MasterTestSuite_DemoDbTests;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.logging.OseeLog;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -30,6 +31,7 @@ public class MasterTestSuite_DemoIntegrationSuite {
@BeforeClass
public static void setup() throws Exception {
+ OseeProperties.setIsInTest(true);
OseeLog.log(MasterTestSuite_DemoIntegrationSuite.class, Level.INFO,
"Starting osee client integration test suite...");
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/CoreRuntimeFeatureTestsSuite.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/CoreRuntimeFeatureTestsSuite.java
index 45409664176..8bf10f85680 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/CoreRuntimeFeatureTestsSuite.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/suite/CoreRuntimeFeatureTestsSuite.java
@@ -15,7 +15,9 @@ import org.eclipse.osee.framework.core.model.test.AllCoreModelTestSuite;
import org.eclipse.osee.framework.core.test.FrameworkCoreTestSuite;
import org.eclipse.osee.framework.database.test.DatabaseTestSuite;
import org.eclipse.osee.framework.jdk.core.JdkCoreTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.lifecycle.test.AllLifecycleTestSuite;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -28,5 +30,8 @@ import org.junit.runners.Suite;
AllCoreMessageTestSuite.class,
AllLifecycleTestSuite.class,})
public class CoreRuntimeFeatureTestsSuite {
- // Test Suite class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
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 2648ced184e..58ed2c1cb49 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
@@ -18,6 +18,7 @@ import org.eclipse.osee.framework.core.client.OseeClientProperties;
import org.eclipse.osee.framework.core.client.OseeClientSession;
import org.eclipse.osee.framework.database.init.DatabaseInitializationOperation;
import org.eclipse.osee.framework.jdk.core.util.Lib;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -35,6 +36,7 @@ public class MasterTestSuite_DemoDbInit {
@BeforeClass
public static void setup() throws Exception {
+ OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
RenderingUtil.setPopupsAllowed(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 2896c9a6e53..8d01c946616 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
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.Review_Demo_Suite;
import org.eclipse.osee.coverage.Coverage_Db_Suite;
import org.eclipse.osee.define.AllDefineTestSuite;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.messaging.event.res.test.AllEventResTestSuite;
import org.eclipse.osee.framework.skynet.core.FrameworkCore_Demo_Suite;
import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
@@ -48,6 +49,7 @@ import org.junit.runners.Suite;
public class MasterTestSuite_DemoDbTests {
@BeforeClass
public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
assertTrue("Client must authenticate using demo protocol",
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
index 9c55629b849..7bbd1ddcde0 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditorMergeTab.java
@@ -53,7 +53,6 @@ import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
-import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.util.HelpUtil;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -327,18 +326,18 @@ public class CoverageEditorMergeTab extends FormPage implements ISaveable {
@Override
protected void doWork(IProgressMonitor monitor) throws Exception {
- final ElapsedTime elapsedTime = new ElapsedTime(getName());
+ // final ElapsedTime elapsedTime = new ElapsedTime(getName());
final XResultData resultData = new XResultData(false);
final List<IMergeItem> mergeItems = mergeManager.getMergeItems(resultData);
Displays.ensureInDisplayThread(new Runnable() {
@Override
public void run() {
- elapsedTime.logPoint("setInput");
+ // elapsedTime.logPoint("setInput");
xImportViewer2.getXViewer().setInput(mergeItems);
if (debugReport) {
resultData.report("Re-Load");
}
- elapsedTime.end();
+ // elapsedTime.end();
}
});
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
index c4424560877..fe579ad8000 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewer.java
@@ -46,7 +46,6 @@ import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
-import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TreeColumn;
@@ -299,9 +298,9 @@ public class CoverageXViewer extends XViewer implements ISelectedCoverageEditorI
@Override
public void update(Object element) {
- ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - update");
+ // ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - update");
xCoverageViewer.getXViewer().update(element, null);
- elapsedTime.end();
+ // elapsedTime.end();
}
@Override
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeManager.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeManager.java
index c2b24f11264..9e63283796d 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeManager.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeManager.java
@@ -54,7 +54,7 @@ public class MergeManager {
Collection<? extends ICoverage> children = coverageImport.getChildren();
int count = 0;
for (ICoverage importCoverage : children) {
- System.out.println(String.format("Get merge items from %d/%d - [%s]", count, children.size(), importCoverage));
+ // System.out.println(String.format("Get merge items from %d/%d - [%s]", count, children.size(), importCoverage));
processImportCoverage(importCoverage, mergeItems, resultData);
count++;
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
index 3b2ee1de32d..9628836fd85 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java
@@ -47,7 +47,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
-import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
/**
* @author Donald G. Dunne
@@ -134,7 +133,7 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave
public Result save(SkynetTransaction transaction, CoveragePackageEvent coverageEvent) throws OseeCoreException {
boolean newCoveragePackage = getArtifact(false) == null;
getArtifact(true);
- ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - save");
+ // ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - save");
artifact.setName(coveragePackage.getName());
coverageEvent.getPackage().setEventType(newCoveragePackage ? CoverageEventType.Added : CoverageEventType.Modified);
artifact.setSoleAttributeValue(CoreAttributeTypes.Active, coveragePackage.isEditable().isTrue());
@@ -147,12 +146,12 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave
}
}
artifact.persist(transaction);
- elapsedTime.end();
+ // elapsedTime.end();
return Result.TrueResult;
}
public Result save(SkynetTransaction transaction, CoveragePackageEvent coverageEvent, Collection<ICoverage> coverages) throws OseeCoreException {
- ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - save(coverages)");
+ // ElapsedTime elapsedTime = new ElapsedTime(getClass().getSimpleName() + " - save(coverages)");
for (ICoverage coverage : coverages) {
CoverageUnit coverageUnit = null;
if (coverage instanceof CoverageItem) {
@@ -165,7 +164,7 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave
OseeCoverageUnitStore store = new OseeCoverageUnitStore(coverageUnit, transaction.getBranch());
store.save(transaction, coverageEvent);
}
- elapsedTime.end();
+ // elapsedTime.end();
return Result.TrueResult;
}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AllAccessTestSuite.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AllAccessTestSuite.java
index 50dc2a0930b..8ae6a04daa0 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AllAccessTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AllAccessTestSuite.java
@@ -11,6 +11,8 @@
package org.eclipse.osee.framework.access.test;
import org.eclipse.osee.framework.access.test.internal.InternalAccessTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -19,5 +21,8 @@ import org.junit.runners.Suite;
InternalAccessTestSuite.class, //
})
public class AllAccessTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java
index ab8639ebf16..f4eaa6b174d 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java
@@ -11,6 +11,8 @@
package org.eclipse.osee.framework.access.test.internal;
import org.eclipse.osee.framework.access.test.internal.cm.CmAccessTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,5 +22,8 @@ CmAccessTestSuite.class, //
OnEditOperationTest.class, //
})
public class InternalAccessTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessTestSuite.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessTestSuite.java
index 817a92ddb67..6352505b76c 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.access.test.internal.cm;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -21,5 +23,8 @@ CmAccessProviderTest.class, //
* @author Roberto E. Escobar
*/
public class CmAccessTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java
index 447fd71f3bd..f6688e63444 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.framework.core.model.AbstractOseeType;
import org.eclipse.osee.framework.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.util.GUID;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.logging.OseeLog;
/**
@@ -299,7 +300,9 @@ public abstract class AbstractOseeCache<T extends AbstractOseeType> implements I
@Override
public synchronized boolean reloadCache() throws OseeCoreException {
getDataAccessor().load(this);
- OseeLog.log(this.getClass(), Level.INFO, "Loaded " + getCacheId().toString().toLowerCase());
+ if (!OseeProperties.isInTest()) {
+ OseeLog.log(this.getClass(), Level.INFO, "Loaded " + getCacheId().toString().toLowerCase());
+ }
setLastLoaded(System.currentTimeMillis());
return true;
}
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/FrameworkCoreTestSuite.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/FrameworkCoreTestSuite.java
index 222026e65d7..df7a76e8022 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/FrameworkCoreTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/FrameworkCoreTestSuite.java
@@ -15,6 +15,8 @@ import org.eclipse.osee.framework.core.test.exception.ExceptionTestSuite;
import org.eclipse.osee.framework.core.test.internal.InternalCoreTestSuite;
import org.eclipse.osee.framework.core.test.ops.OpsTestSuite;
import org.eclipse.osee.framework.core.test.util.UtilCoreTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -29,5 +31,8 @@ import org.junit.runners.Suite;
* @author Roberto E. Escobar
*/
public class FrameworkCoreTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/enums/EnumsTestSuite.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/enums/EnumsTestSuite.java
index eceefb49fd6..8ad09937f3d 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/enums/EnumsTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/enums/EnumsTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.test.enums;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -24,5 +26,8 @@ import org.junit.runners.Suite;
* @author Roberto E. Escobar
*/
public class EnumsTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/exception/ExceptionTestSuite.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/exception/ExceptionTestSuite.java
index 334a122b93e..ddc00a7afdb 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/exception/ExceptionTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/exception/ExceptionTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.test.exception;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -19,5 +21,8 @@ import org.junit.runners.Suite;
* @author Ryan D. Brooks
*/
public class ExceptionTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/internal/InternalCoreTestSuite.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/internal/InternalCoreTestSuite.java
index e48d4a2e092..b7cd5870553 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/internal/InternalCoreTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/internal/InternalCoreTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.test.internal;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,8 @@ SingletonServiceBinderTest.class, //
* @author Roberto E. Escobar
*/
public class InternalCoreTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/ops/OpsTestSuite.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/ops/OpsTestSuite.java
index 6a4c7dc3297..de05a0d0bf2 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/ops/OpsTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/ops/OpsTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.test.ops;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -19,5 +21,8 @@ import org.junit.runners.Suite;
* @author Ryan D. Brooks
*/
public class OpsTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
index c0209e87d6e..7465ea97197 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java
@@ -105,7 +105,10 @@ public class HttpProcessor {
config.setProxy(data.getHost(), data.getPort());
}
}
- OseeLog.format(Activator.class, Level.INFO, "Http-Request: [%s] [%s]", requests++, uri.toASCIIString());
+ // Don't display INFO if running tests
+ if (!OseeProperties.isInTest()) {
+ OseeLog.format(Activator.class, Level.INFO, "Http-Request: [%s] [%s]", requests++, uri.toASCIIString());
+ }
}
public static String acquireString(URL url) throws Exception {
diff --git a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
index 320fda4a12e..370ae07a7cd 100644
--- a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.database.core;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -26,5 +28,8 @@ import org.junit.runners.Suite;
* @author Roberto E. Escobar
*/
public class DatabaseCoreTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/test/DatabaseTestSuite.java b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/test/DatabaseTestSuite.java
index aea4cd6328f..cdc14ebabab 100644
--- a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/test/DatabaseTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/test/DatabaseTestSuite.java
@@ -11,6 +11,8 @@
package org.eclipse.osee.framework.database.test;
import org.eclipse.osee.framework.database.core.DatabaseCoreTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,5 +22,8 @@ import org.junit.runners.Suite;
* @author Roberto E. Escobar
*/
public class DatabaseTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/JdkCoreTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/JdkCoreTestSuite.java
index c2e32873bba..063309f4804 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/JdkCoreTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/JdkCoreTestSuite.java
@@ -14,6 +14,8 @@ import org.eclipse.osee.framework.jdk.core.rules.JdkCoreRuleTestSuite;
import org.eclipse.osee.framework.jdk.core.text.JdkCoreTextTestSuite;
import org.eclipse.osee.framework.jdk.core.type.JdkCoreTypeTestSuite;
import org.eclipse.osee.framework.jdk.core.util.JdkCoreUtilTestSuite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -28,5 +30,8 @@ import org.junit.runners.Suite;
JdkCoreTypeTestSuite.class,
JdkCoreUtilTestSuite.class,})
public class JdkCoreTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/rules/JdkCoreRuleTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/rules/JdkCoreRuleTestSuite.java
index 490e19d2776..3753bdbfdb8 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/rules/JdkCoreRuleTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/rules/JdkCoreRuleTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.jdk.core.rules;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -19,5 +21,8 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({WordMLNewLineMakerRuleTest.class})
public class JdkCoreRuleTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/JdkCoreUtilTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/JdkCoreUtilTestSuite.java
index 7b9c5d7991c..01023f3123b 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/JdkCoreUtilTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/JdkCoreUtilTestSuite.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.jdk.core.util;
import org.eclipse.osee.framework.jdk.core.util.io.IoTestSuite;
import org.eclipse.osee.framework.jdk.core.util.xml.XmlTestSuite;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -30,5 +31,8 @@ import org.junit.runners.Suite;
ReservedCharactersTest.class,
StringsTest.class,})
public class JdkCoreUtilTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/IoTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/IoTestSuite.java
index 73acd4fcebf..1d57c8e0254 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/IoTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/IoTestSuite.java
@@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.framework.jdk.core.util.io;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.jdk.core.util.io.xml.IoXmlTestSuite;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -25,5 +27,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class IoTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/xml/IoXmlTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/xml/IoXmlTestSuite.java
index ba8379473f1..72125d0e741 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/xml/IoXmlTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/io/xml/IoXmlTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.jdk.core.util.io.xml;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,5 +22,8 @@ import org.junit.runners.Suite;
@Suite.SuiteClasses({ //
ExcelXmlWriterTest.class})
public class IoXmlTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTestSuite.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTestSuite.java
index 8ffc06cde8d..053431fcda6 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.jdk.core.util.xml;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class XmlTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
index 8c8b2f265b6..4865592d00f 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
@@ -15,8 +15,10 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.logging.Level;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.ConnectionListener;
import org.eclipse.osee.framework.messaging.ConnectionNode;
import org.eclipse.osee.framework.messaging.OseeMessagingListener;
@@ -47,18 +49,18 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void fail(Throwable th) {
- System.err.println(getClass().getSimpleName() + " - fail: " + th.getLocalizedMessage());
- th.printStackTrace();
+ OseeLog.log(Activator.class, Level.SEVERE, th);
+
}
@Override
public void sendRemoteEvent(RemoteEvent remoteEvent) throws OseeCoreException {
ResMessages resMessage = getResMessageType(remoteEvent);
if (resMessage == null) {
- System.out.println(String.format("ResEventManager: Unhandled remote event [%s]", remoteEvent));
+ OseeLog.log(Activator.class, Level.INFO, null, "ResEventManager: Unhandled remote event [%s]", resMessage);
} else if (connectionNode == null) {
- System.out.println(String.format(
- "ResEventManager: Connection node was null - unable to send remote event [%s] ", resMessage));
+ OseeLog.log(Activator.class, Level.INFO, null,
+ "ResEventManager: Connection node was null - unable to send remote event [%s]", resMessage);
} else {
connectionNode.send(resMessage, remoteEvent, this);
}
@@ -90,7 +92,7 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void addFrameworkListener(IFrameworkEventListener frameworkEventListener) {
- System.out.println("Registering Client for Remote Events\n");
+ OseeLog.log(Activator.class, Level.INFO, "Registering Client for Remote Events");
for (Entry<ResMessages, Boolean> messageEntries : messages.entrySet()) {
ResMessages resMessageID = messageEntries.getKey();
@@ -101,7 +103,7 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void removeFrameworkListener(IFrameworkEventListener frameworkEventListener) {
- System.out.println("De-Registering Client for Remote Events\n");
+ OseeLog.log(Activator.class, Level.INFO, "De-Registering Client for Remote Events");
HashCollection<ResMessages, OseeMessagingListener> listeners = subscriptions.get(frameworkEventListener);
if (listeners != null) {
diff --git a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/AllSearchEngineTestSuite.java b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/AllSearchEngineTestSuite.java
index 55f21a5155c..b3d2cc6b031 100644
--- a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/AllSearchEngineTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/AllSearchEngineTestSuite.java
@@ -10,10 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.framework.search.engine.test;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.search.engine.test.attribute.AttributeTestSuite;
import org.eclipse.osee.framework.search.engine.test.internal.InternalTestSuite;
import org.eclipse.osee.framework.search.engine.test.language.LanguageTestSuite;
import org.eclipse.osee.framework.search.engine.test.utility.UtilityTestSuite;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -30,5 +32,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class AllSearchEngineTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/attribute/AttributeTestSuite.java b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/attribute/AttributeTestSuite.java
index bf0e642188f..05d6e74ae79 100644
--- a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/attribute/AttributeTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/attribute/AttributeTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.search.engine.test.attribute;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class AttributeTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/InternalTestSuite.java b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/InternalTestSuite.java
index 86cdffa26a3..f3afc7a69a2 100644
--- a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/InternalTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/InternalTestSuite.java
@@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.framework.search.engine.test.internal;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.search.engine.test.internal.search.InternalSearchTestSuite;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -24,5 +26,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class InternalTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/search/InternalSearchTestSuite.java b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/search/InternalSearchTestSuite.java
index 562006f0c1f..1dfa0245593 100644
--- a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/search/InternalSearchTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/internal/search/InternalSearchTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.search.engine.test.internal.search;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,9 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class InternalSearchTestSuite {
- // Test Suite Class
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/language/LanguageTestSuite.java b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/language/LanguageTestSuite.java
index 1bedabd9506..0a89988e111 100644
--- a/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/language/LanguageTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.search.engine.test/src/org/eclipse/osee/framework/search/engine/test/language/LanguageTestSuite.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.search.engine.test.language;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -23,5 +25,8 @@ import org.junit.runners.Suite;
//@formatter:on
})
public class LanguageTestSuite {
- // Test Suite Class
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Demo_Suite.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Demo_Suite.java
index dccbf50a651..3d742973933 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Demo_Suite.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core;
import static org.junit.Assert.assertTrue;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactPurgeTest;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTestSuite;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeInheritanceTest;
@@ -99,6 +100,7 @@ import org.junit.runners.Suite;
public class FrameworkCore_Demo_Suite {
@BeforeClass
public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
assertTrue("Client must authenticate using demo protocol",
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Production_Suite.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Production_Suite.java
index eb6771b7f61..aa306542a92 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Production_Suite.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/FrameworkCore_Production_Suite.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.skynet.core;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQueryPerformanceTests;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQueryTestProduction;
import org.junit.Assert;
@@ -27,6 +28,7 @@ public class FrameworkCore_Production_Suite {
@BeforeClass
public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
Assert.assertTrue("Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("lba"));
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
index 78112e690e1..54d147c602d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
@@ -13,12 +13,9 @@ package org.eclipse.osee.framework.skynet.core.revision;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-
import java.util.Collection;
import java.util.LinkedList;
-
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -71,9 +68,7 @@ public class DeletionTest {
private static final String GET_RELATION_DEBUG =
"select txs.branch_id, txs.transaction_id, txs.tx_current, txs.mod_type, txs.gamma_id, rel.rel_link_id, rel.a_art_id, rel.b_art_id FROM osee_txs txs, osee_relation_link rel WHERE txs.branch_id = ? AND txs.gamma_id = rel.gamma_id AND rel.rel_link_id = ?";
- private static final boolean DEBUG =
- "TRUE".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.osee.framework.skynet.core.test/debug/Junit"));
-
+ private static final boolean DEBUG = false;
private static final boolean DELETE_TRANSACTION_TEST = true;
private static final boolean INDIVIDUAL_DELETE_TEST = true;
@@ -362,15 +357,16 @@ public class DeletionTest {
public static void dumpArtifact(Artifact artifact) throws OseeCoreException {
IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- System.out.println(" Artifact Dump : " + artifact.getName());
- chStmt.runPreparedQuery(GET_ARTIFACT_DEBUG, artifact.getBranch().getId(), artifact.getArtId());
- while (chStmt.next()) {
- System.out.println(String.format(
- " Art Id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
- chStmt.getInt("art_id"), chStmt.getInt("branch_id"), chStmt.getInt("tx_current"),
- chStmt.getInt("mod_type"), chStmt.getInt("transaction_id"), chStmt.getInt("gamma_id")));
+ if (DEBUG) {
+ System.out.println(" Artifact Dump : " + artifact.getName());
+ chStmt.runPreparedQuery(GET_ARTIFACT_DEBUG, artifact.getBranch().getId(), artifact.getArtId());
+ while (chStmt.next()) {
+ System.out.println(String.format(
+ " Art Id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
+ chStmt.getInt("art_id"), chStmt.getInt("branch_id"), chStmt.getInt("tx_current"),
+ chStmt.getInt("mod_type"), chStmt.getInt("transaction_id"), chStmt.getInt("gamma_id")));
+ }
}
-
} finally {
chStmt.close();
}
@@ -379,16 +375,17 @@ public class DeletionTest {
public static void dumpAttribute(Attribute<?> attribute) throws OseeDataStoreException, OseeCoreException {
IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- System.out.println(" Attribute Dump");
- chStmt.runPreparedQuery(GET_ATTRIBUTE_DEBUG, attribute.getArtifact().getBranch().getId(), attribute.getId());
- while (chStmt.next()) {
- System.out.println(String.format(
- " Attribute Id = %d Art_id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
- chStmt.getInt("attr_id"), chStmt.getInt("art_id"), chStmt.getInt("branch_id"),
- chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getInt("transaction_id"),
- chStmt.getInt("gamma_id")));
+ if (DEBUG) {
+ System.out.println(" Attribute Dump");
+ chStmt.runPreparedQuery(GET_ATTRIBUTE_DEBUG, attribute.getArtifact().getBranch().getId(), attribute.getId());
+ while (chStmt.next()) {
+ System.out.println(String.format(
+ " Attribute Id = %d Art_id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
+ chStmt.getInt("attr_id"), chStmt.getInt("art_id"), chStmt.getInt("branch_id"),
+ chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getInt("transaction_id"),
+ chStmt.getInt("gamma_id")));
+ }
}
-
} finally {
chStmt.close();
}
@@ -397,16 +394,17 @@ public class DeletionTest {
public static void dumpRelation(RelationLink relation, Artifact artifact) throws OseeCoreException {
IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- System.out.println(" Relation Dump");
- chStmt.runPreparedQuery(GET_RELATION_DEBUG, artifact.getBranch().getId(), relation.getId());
- while (chStmt.next()) {
- System.out.println(String.format(
- " Relation Id = %d a_art_id = %d b_art_id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
- chStmt.getInt("rel_link_id"), chStmt.getInt("a_art_id"), chStmt.getInt("b_art_id"),
- chStmt.getInt("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"),
- chStmt.getInt("transaction_id"), chStmt.getInt("gamma_id")));
+ if (DEBUG) {
+ System.out.println(" Relation Dump");
+ chStmt.runPreparedQuery(GET_RELATION_DEBUG, artifact.getBranch().getId(), relation.getId());
+ while (chStmt.next()) {
+ System.out.println(String.format(
+ " Relation Id = %d a_art_id = %d b_art_id = %d Branch Id = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
+ chStmt.getInt("rel_link_id"), chStmt.getInt("a_art_id"), chStmt.getInt("b_art_id"),
+ chStmt.getInt("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"),
+ chStmt.getInt("transaction_id"), chStmt.getInt("gamma_id")));
+ }
}
-
} finally {
chStmt.close();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
index 7a07b0d692d..03633290bdf 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
@@ -152,7 +152,7 @@ public class PurgeArtifacts extends DbTransaction {
OseeLog.log(
Activator.class,
- Level.INFO,
+ Level.FINE,
String.format(
"Purge Row Deletes: txs rows [%d], rel ver rows [%d], attr ver rows [%d] art ver rows [%d]. txs vs. total versions [%d vs %d]",
txsDeletes, relationVersions, attributeVersions, artifactVersions, txDetails,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java
index 73749bf55aa..8bfe7b2a4f8 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java
@@ -15,6 +15,7 @@ import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
@@ -37,8 +38,10 @@ public class NewArtifactImportResolver implements IArtifactImportResolver {
public Artifact resolve(final RoughArtifact roughArtifact, final IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException {
IArtifactType artifactType = getArtifactType(roughArtifact.getRoughArtifactKind());
- OseeLog.format(NewArtifactImportResolver.class, Level.INFO, "New artifact: [%s]. Attributes: [%s]",
- roughArtifact, roughArtifact.getAttributes());
+ if (!OseeProperties.isInTest()) {
+ OseeLog.format(NewArtifactImportResolver.class, Level.INFO, "New artifact: [%s]. Attributes: [%s]",
+ roughArtifact, roughArtifact.getAttributes());
+ }
Artifact realArtifact =
ArtifactTypeManager.addArtifact(artifactType, branch, roughArtifact.getGuid(),
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/InterArtifactDropTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/InterArtifactDropTest.java
index 831e969f4c4..4c7c354a9cd 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/InterArtifactDropTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/InterArtifactDropTest.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.ui.skynet.test.cases;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import java.util.logging.Level;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -27,7 +26,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.update.InterArtifactExplorerDropHandler;
import org.junit.Before;
@@ -112,9 +110,7 @@ public class InterArtifactDropTest {
}
public static void sleep(long milliseconds) throws Exception {
- OseeLog.log(SkynetGuiPlugin.class, Level.INFO, "Sleeping " + milliseconds);
Thread.sleep(milliseconds);
- OseeLog.log(SkynetGuiPlugin.class, Level.INFO, "Awake");
}
}
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/model/ModelFinderService.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/model/ModelFinderService.java
index 28b4331551d..a31d2d3ed94 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/model/ModelFinderService.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/model/ModelFinderService.java
@@ -8,6 +8,8 @@ package org.eclipse.osee.ote.core.model;
import java.rmi.RemoteException;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import org.eclipse.osee.framework.logging.OseeLog;
/**
* @author Michael P. Masterson
@@ -23,37 +25,34 @@ public class ModelFinderService {
}
public void start() {
- System.out.println("##########################Starting model finder");
+ OseeLog.log(ModelFinderService.class, Level.INFO, "### Starting model finder");
ModelFinderService.instance = this;
}
public void stop() {
- System.out.println("########################### Stopping model finder");
+ OseeLog.log(ModelFinderService.class, Level.INFO, "### Stopping model finder");
models.clear();
}
public void addModel(IModel newModel) {
try {
- System.out.printf("################################ Adding model %s\n", newModel.getKey());
+ OseeLog.log(ModelFinderService.class, Level.INFO, null, "### Adding model %s\n", newModel.getKey());
models.put(newModel.getKey(), newModel);
- }
- catch (RemoteException ex) {
+ } catch (RemoteException ex) {
ex.printStackTrace();
}
}
public void removeModel(IModel newModel) {
try {
- System.out.printf("################################# Removing model %s\n", newModel.getKey());
+ OseeLog.log(ModelFinderService.class, Level.INFO, null, "### Removing model %s\n", newModel.getKey());
models.remove(newModel.getKey());
- }
- catch (RemoteException ex) {
+ } catch (RemoteException ex) {
ex.printStackTrace();
}
}
- public <T extends IModel> T getModel(ModelKey<T> key)
- {
+ public <T extends IModel> T getModel(ModelKey<T> key) {
IModel retVal = models.get(key);
return (T) retVal;
}
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 c6b7bba8433..21c1313e109 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
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.database.core.OseeInfo;
import org.eclipse.osee.framework.jdk.core.util.Lib;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.logging.IHealthStatus;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
@@ -31,14 +32,16 @@ public class TestUtil {
private static final String DEMO_DB_TYPE = "demo";
public static final Collection<String> ignoreLogging = Arrays.asList("No image was defined for art type",
"Unable to load the image for [SAVED]");
- private static boolean inTest = false;
public static boolean isInTest() {
- return inTest;
+ return Boolean.valueOf(System.getProperty("osee.isInTest"));
}
+ /**
+ * Need to match methods in OseeProperties
+ */
public static void setIsInTest(boolean isInTest) {
- inTest = isInTest;
+ System.setProperty("osee.isInTest", String.valueOf(isInTest));
}
public static boolean isProductionDb() throws OseeCoreException {
@@ -62,9 +65,9 @@ public class TestUtil {
}
public static void sleep(long milliseconds) throws Exception {
- System.out.println("Sleeping " + milliseconds);
+ // System.out.println("Sleeping " + milliseconds);
Thread.sleep(milliseconds);
- System.out.println("Awake");
+ // System.out.println("Awake");
}
public static SevereLoggingMonitor severeLoggingStart() throws Exception {
@@ -128,9 +131,11 @@ public class TestUtil {
public static void checkThatIncreased(Map<String, Integer> prevCount, Map<String, Integer> postCount) {
for (String name : prevCount.keySet()) {
- String incStr = postCount.get(name) > prevCount.get(name) ? "Increased" : "ERROR, Not Increased";
- System.out.println(String.format(incStr + ": [%s] pre[%d] vs post[%d]", name, prevCount.get(name),
- postCount.get(name)));
+ if (!OseeProperties.isInTest()) {
+ String incStr = postCount.get(name) > prevCount.get(name) ? "Increased" : "ERROR, Not Increased";
+ System.out.println(String.format(incStr + ": [%s] pre[%d] vs post[%d]", name, prevCount.get(name),
+ postCount.get(name)));
+ }
}
for (String name : prevCount.keySet()) {
Assert.assertTrue(String.format("[%s] did not increase as expected: pre[%d] vs post[%d]", name,
@@ -140,9 +145,11 @@ public class TestUtil {
public static void checkThatEqual(Map<String, Integer> prevCount, Map<String, Integer> postCount) {
for (String tableName : prevCount.keySet()) {
- String equalStr = postCount.get(tableName).equals(prevCount.get(tableName)) ? "Equal" : "ERROR, NotEqual";
- System.out.println(String.format(equalStr + ": [%s] pre[%d] post[%d]", tableName, prevCount.get(tableName),
- postCount.get(tableName)));
+ if (!OseeProperties.isInTest()) {
+ String equalStr = postCount.get(tableName).equals(prevCount.get(tableName)) ? "Equal" : "ERROR, NotEqual";
+ System.out.println(String.format(equalStr + ": [%s] pre[%d] post[%d]", tableName, prevCount.get(tableName),
+ postCount.get(tableName)));
+ }
}
for (String tableName : prevCount.keySet()) {
Assert.assertTrue(

Back to the top