Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-09-16 16:01:02 +0000
committerRoberto E. Escobar2014-10-01 21:04:50 +0000
commita54770b7411aff166b7488461df934090d3a02a5 (patch)
treecaacd859383b34446bcd96181276745453e3fbbd
parent7e7e8a2f1838153349c62572407eb6660a93d510 (diff)
downloadorg.eclipse.osee-a54770b7411aff166b7488461df934090d3a02a5.tar.gz
org.eclipse.osee-a54770b7411aff166b7488461df934090d3a02a5.tar.xz
org.eclipse.osee-a54770b7411aff166b7488461df934090d3a02a5.zip
refinement: Improve cleanup of AtsTestUtil
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
index f667ba976da..73788ea1ddd 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
@@ -18,6 +18,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
+import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.ChangeType;
@@ -74,6 +75,8 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
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.transaction.TransactionManager;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.support.test.util.TestUtil;
@@ -470,6 +473,17 @@ public class AtsTestUtil {
deleteTeamWf(teamArt3);
deleteTeamWf(teamArt4);
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(),
+ AtsTestUtil.class.getSimpleName() + " - cleanup config");
+ for (IAtsConfigObject config : Arrays.asList(teamDef, testAi, testAi2, testAi3, testAi4)) {
+ if (config != null && config.getStoreObject() instanceof Artifact) {
+ Artifact art = (Artifact) config.getStoreObject();
+ art.deleteAndPersist(transaction);
+ }
+ }
+ transaction.execute();
+
clearCaches();
// validate that there are no dirty artifacts in cache

Back to the top