Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-04-10 23:35:36 +0000
committerRoberto E. Escobar2013-04-13 01:07:48 +0000
commit0bdf6239d9a91b32e9cd9a9ef779eeecea1df025 (patch)
tree57680050ea9c3e72c28fe70c94c33e0a2e3f2124 /plugins/org.eclipse.osee.ats.client.integration.tests
parent433ee35f92cc6bc4b70d71c91186c5e579b6bd8a (diff)
downloadorg.eclipse.osee-0bdf6239d9a91b32e9cd9a9ef779eeecea1df025.tar.gz
org.eclipse.osee-0bdf6239d9a91b32e9cd9a9ef779eeecea1df025.tar.xz
org.eclipse.osee-0bdf6239d9a91b32e9cd9a9ef779eeecea1df025.zip
refinement: Improve AtsBranchCommit error reporting by using operation
Diffstat (limited to 'plugins/org.eclipse.osee.ats.client.integration.tests')
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
index b8a56d1836..2e26cef0cf 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
@@ -18,7 +18,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.logging.Level;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
@@ -31,7 +30,6 @@ import org.eclipse.osee.ats.core.client.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
-
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.AtsVersionService;
@@ -46,6 +44,7 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -167,8 +166,8 @@ public class AtsBranchConfigurationTest {
transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "Branch Configuration Test");
Artifact actionArt =
ActionManager.createAction(null, BRANCH_VIA_VERSIONS.getName() + " Req Changes", "description",
- ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null,
- transaction);
+ ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(),
+ AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
AtsVersionService.get().setTargetedVersionAndStore(teamWf, versionToTarget);
teamWf.persist(transaction);
@@ -181,7 +180,8 @@ public class AtsBranchConfigurationTest {
OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Transitioning to Implement state");
}
- dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false, transaction);
+ dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false,
+ transaction);
teamWf.persist("Branch Configuration Test");
SMAEditor.editArtifact(teamWf);
@@ -282,7 +282,8 @@ public class AtsBranchConfigurationTest {
String actionTitle = BRANCH_VIA_TEAM_DEFINITION.getName() + " Req Changes";
Artifact actionArt =
ActionManager.createAction(null, actionTitle, "description", ChangeType.Problem, "1", false, null,
- selectedActionableItems, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
+ selectedActionableItems, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null,
+ transaction);
transaction.execute();
final TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
@@ -292,7 +293,8 @@ public class AtsBranchConfigurationTest {
if (DEBUG) {
OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Transitioning to Implement state");
}
- dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false, transaction);
+ dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false,
+ transaction);
teamWf.persist("Test branch via team definition: Transition to desired state");
// create branch
@@ -412,14 +414,10 @@ public class AtsBranchConfigurationTest {
}
public static void commitBranch(TeamWorkFlowArtifact teamWf) throws Exception {
- Job job =
+ IOperation op =
AtsBranchManager.commitWorkingBranch(teamWf, false, true,
AtsBranchManagerCore.getWorkingBranch(teamWf).getParentBranch(), true);
- try {
- job.join();
- } catch (InterruptedException ex) {
- //
- }
+ Operations.executeWorkAndCheckStatus(op);
}
public static void createBranch(String namespace, TeamWorkFlowArtifact teamWf) throws Exception {

Back to the top