Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-09-14 14:37:40 -0400
committerRyan D. Brooks2010-09-14 14:37:40 -0400
commitbc81afa09c1c7c33a8890b4698460d9ca9103cfd (patch)
treea4956a7bc3da2ce9b5e74f802b61bcc2586a30bc /plugins
parentc02339f4f85c4288b6604be2c47d73694b13777b (diff)
downloadorg.eclipse.osee-bc81afa09c1c7c33a8890b4698460d9ca9103cfd.tar.gz
org.eclipse.osee-bc81afa09c1c7c33a8890b4698460d9ca9103cfd.tar.xz
org.eclipse.osee-bc81afa09c1c7c33a8890b4698460d9ca9103cfd.zip
bug: Fix AtsNotifyUsersTest cleanup not persisting test artifacts
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
index d240548d63..c76a50a285 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.test.util;
import static org.eclipse.osee.framework.skynet.core.artifact.DeletionFlag.EXCLUDE_DELETED;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
import junit.framework.Assert;
@@ -27,6 +28,7 @@ import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationEvent;
import org.eclipse.osee.support.test.util.DemoUsers;
import org.junit.AfterClass;
@@ -41,10 +43,14 @@ public class AtsNotifyUsersTest {
@BeforeClass
@AfterClass
public static void cleanup() throws OseeCoreException {
- for (Artifact artifact : ArtifactQuery.getArtifactListFromName(AtsNotifyUsersTest.class.getSimpleName(),
- AtsUtil.getAtsBranch(), EXCLUDE_DELETED)) {
- artifact.delete();
+ Collection<Artifact> artifacts =
+ ArtifactQuery.getArtifactListFromName(AtsNotifyUsersTest.class.getSimpleName(), AtsUtil.getAtsBranch(),
+ EXCLUDE_DELETED);
+ SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "AtsNotifyUsersTest Clean-up");
+ for (Artifact artifact : artifacts) {
+ artifact.deleteAndPersist(transaction);
}
+ transaction.execute();
}
@Test

Back to the top