Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-09-29 01:37:10 +0000
committerMegumi Telles2016-09-30 14:47:07 +0000
commitcbb6d4b70d67524444741fb85b0455cd9f170888 (patch)
treed1a1ea3d81484a29cc003c7b5fa20cb3a00be879 /plugins
parent76c03d2c84a189b900f40cd4844393232b3f6f64 (diff)
downloadorg.eclipse.osee-cbb6d4b70d67524444741fb85b0455cd9f170888.tar.gz
org.eclipse.osee-cbb6d4b70d67524444741fb85b0455cd9f170888.tar.xz
org.eclipse.osee-cbb6d4b70d67524444741fb85b0455cd9f170888.zip
bug[ats_ATS317223]: Multiple runs of AtsClient_Integration_TestSuite causes failures
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Team_Demo_SwDesign.ats4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java18
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/CreateTaskRuleTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java10
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java2
7 files changed, 31 insertions, 17 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Team_Demo_SwDesign.ats b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Team_Demo_SwDesign.ats
index 7ae00310127..8db18472b31 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Team_Demo_SwDesign.ats
+++ b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Team_Demo_SwDesign.ats
@@ -63,7 +63,7 @@ workDefinition "WorkDef_Team_Demo_SwDesign" {
}
peerReviewDefinition "Authorize.None.TransitionTo" {
title
- "Auto-created Decision Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo"
+ "Auto-created Peer Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo"
description "This is a rule created to test the Review rules."
relatedToState "Authorize"
blockingType Transition
@@ -72,7 +72,7 @@ workDefinition "WorkDef_Team_Demo_SwDesign" {
}
peerReviewDefinition "Implement.None.CommitBranch" {
title
- "Auto-created Decision Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Implement.None.CommitBranch"
+ "Auto-created Peer Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Implement.None.CommitBranch"
description "This is a rule created to test the Review rules."
relatedToState "Implement"
blockingType Transition
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
index 4ce54c95957..0df892a5652 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.demo.PopulateDemoActions;
@@ -40,8 +41,12 @@ import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.demo.api.DemoTeam;
import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.core.enums.DeletionFlag;
+import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -52,11 +57,22 @@ import org.junit.BeforeClass;
* @author Donald G. Dunne
*/
public class PopulateDemoActionsTest {
+
@BeforeClass
public static void validateDbInit() throws OseeCoreException {
DemoUtil.checkDbInitAndPopulateSuccess();
}
+ @AfterClass
+ public static void cleanup() throws OseeCoreException {
+ IAtsChangeSet changes = AtsClientService.get().createAtsChangeSet("Cleanup PopulateDemoActionsTest");
+ for (Artifact art : ArtifactQuery.getArtifactListFromName("Auto-created", AtsUtilCore.getAtsBranch(),
+ DeletionFlag.EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS)) {
+ changes.deleteArtifact(art);
+ }
+ changes.execute();
+ }
+
@Before
public void setup() throws OseeCoreException {
AtsBulkLoad.reloadConfig(true);
@@ -489,7 +505,7 @@ public class PopulateDemoActionsTest {
Assert.assertNotNull(peerArt);
Assert.assertNotNull(decArt);
testReviewContents(peerArt,
- "Auto-created Decision Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo",
+ "Auto-created Peer Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo",
PeerToPeerReviewState.Prepare.getName(), "UnAssigned");
testReviewContents(decArt,
"Auto-created Decision Review from ruleId: atsAddDecisionReview.test.addDecisionReview.Analyze.None.TransitionTo",
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/CreateTaskRuleTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/CreateTaskRuleTest.java
index 3f59bf49e37..eab11ee71de 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/CreateTaskRuleTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/CreateTaskRuleTest.java
@@ -72,6 +72,8 @@ public class CreateTaskRuleTest {
AtsTestUtil.cleanupSimpleTest(CREATE_TASK_ACTION_FROM_TEAM_DEF_TITLE);
AtsTestUtil.cleanupSimpleTest(CREATE_TASK_ACTION_FROM_AI_TITLE);
AtsTestUtil.cleanupSimpleTest(getClass().getSimpleName());
+
+ AtsClientService.get().getWorkDefinitionAdmin().clearRuleDefinitionsCache();
}
@Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
index d11412c01c8..2ddd7af479f 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
@@ -116,12 +116,12 @@ public class AtsQueryImplTest {
query = queryService.createQuery(WorkItemType.WorkItem);
query.isOfType(WorkItemType.PeerReview);
query.andState("Prepare");
- assertEquals(4, query.getResults().size());
+ assertEquals(1, query.getResults().size());
// by state type
query = queryService.createQuery(WorkItemType.WorkItem);
query.andStateType(StateType.Working);
- assertEquals(48, query.getResults().size());
+ assertEquals(42, query.getResults().size());
query = queryService.createQuery(WorkItemType.TeamWorkflow);
query.andStateType(StateType.Working);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
index 1c588b64b47..f6de2789103 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
@@ -21,7 +21,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Open " + WorkItemType.DecisionReview.name() + "s",
WorkItemType.DecisionReview, false, false, AtsImage.DECISION_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(5, AtsArtifactTypes.DecisionReview, results);
+ checkResults(2, AtsArtifactTypes.DecisionReview, results);
}
@org.junit.Test
@@ -30,7 +30,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Workflows Waiting " + WorkItemType.DecisionReview.name() + "s",
WorkItemType.DecisionReview, false, true, AtsImage.DECISION_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(5, AtsArtifactTypes.TeamWorkflow, results);
+ checkResults(2, AtsArtifactTypes.TeamWorkflow, results);
}
@org.junit.Test
@@ -39,7 +39,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Open " + WorkItemType.PeerReview.name() + "s", WorkItemType.PeerReview,
false, false, AtsImage.PEER_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(5, AtsArtifactTypes.PeerToPeerReview, results);
+ checkResults(2, AtsArtifactTypes.PeerToPeerReview, results);
}
@org.junit.Test
@@ -48,7 +48,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Workflows Waiting " + WorkItemType.PeerReview.name() + "s",
WorkItemType.PeerReview, false, true, AtsImage.PEER_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(4, AtsArtifactTypes.TeamWorkflow, results);
+ checkResults(1, AtsArtifactTypes.TeamWorkflow, results);
}
private void checkResults(int expectedCount, IArtifactType ofType, Collection<Artifact> results) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
index a5507bd99dc..073f4f1920a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
@@ -98,13 +98,9 @@ public class AtsConfigOperation extends AbstractOperation {
}
private void checkWorkItemNamespaceUnique() throws OseeCoreException {
- IWorkDefinitionMatch match = null;
- try {
- match = AtsClientService.get().getWorkDefinitionAdmin().getWorkDefinition(name);
- } catch (Exception ex) {
- return;
- }
- if (match.isMatched()) {
+ Artifact workDefArt = ArtifactQuery.getArtifactFromTypeAndNameNoException(AtsArtifactTypes.WorkDefinition, name,
+ AtsUtilCore.getAtsBranch());
+ if (workDefArt != null) {
throw new OseeArgumentException(
String.format("Configuration Namespace [%s] already used, choose a unique namespace.", name));
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
index df895affcc8..71b40cae8bd 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
@@ -169,7 +169,7 @@ public final class Conditions {
}
public static void assertEquals(int value1, int value2, String message, Object... data) {
- checkExpressionFailOnTrue(value1 != value2, message, data);
+ checkExpressionFailOnTrue(value1 != value2, message + " - Expected %d; Actual %d", data, value1, value2);
}
public static void assertEquals(int value1, int value2) {

Back to the top