diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-03 06:32:27 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-03 06:32:27 +0000 |
commit | 734f533af917bf533944d1ea0906bdb8ddb9219f (patch) | |
tree | 46d6e35677e9e0be11db56ff9c7f0202fae842d0 /sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest | |
parent | 355268626d0493523956137113a8e61dcf615e46 (diff) |
Update to work with DomainNode
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@960161 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest')
-rw-r--r-- | sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java index 9431fee034..c3829af8f0 100644 --- a/sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java +++ b/sca-java-2.x/trunk/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -28,10 +28,9 @@ import java.io.IOException; import java.io.InputStream;
import java.util.Properties;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.apache.tuscany.sca.node2.Node;
+import org.apache.tuscany.sca.node2.NodeFactory;
import client.RuntimeBridge;
import client.TestConfiguration;
@@ -76,16 +75,23 @@ public class TuscanyRuntimeBridge implements RuntimeBridge { ps.setProperty("defaultScheme", "vm");
ps.setProperty("org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSBindingProviderFactory.defaultPort", "8080");
launcher = NodeFactory.newInstance(ps);
+ node = launcher.createNode("default");
- Contribution[] contributions = new Contribution[contributionNames.length];
+// Contribution[] contributions = new Contribution[contributionNames.length];
String[] contributionURIs = getContributionURIs(contributionLocation);
- for (int i = 0; i < contributions.length; i++) {
- contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
- } // end for
+// for (int i = 0; i < contributions.length; i++) {
+// contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]);
+// } // end for
+
+ for (int i=contributionURIs.length-1; i > -1; i--) {
+ node.installContribution(contributionNames[i], contributionURIs[i], null, null, false);
+ }
+
+ node.addToDomainLevelComposite(contributionNames[0] + "/" + testConfiguration.getComposite());
- node = launcher.createNode(testConfiguration.getComposite(), contributions);
+// node = NodeFactory.createNode(testConfiguration.getComposite(), contributionURIs);
// Start the node
- node.start();
+// node.start();
// For debugging
// print out the composites that have been read in success cases
@@ -141,18 +147,17 @@ public class TuscanyRuntimeBridge implements RuntimeBridge { node.stop();
} // end if
if (launcher != null) {
- launcher.destroy();
+ launcher.stop();
} // end if
} // end method stopContribution
- public String getContributionLocation(Class<?> testClass) {
- return ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass());
- } // end method getContributionLocation
-
public void checkError(String testName, Throwable ex) throws Throwable {
String expectedMessage = expectedErrorMessages.getProperty(testName);
String receivedMessage = ex.getMessage();
+ if (ex instanceof ValidationException && ex.getCause() == null) {
+ receivedMessage = "org.apache.tuscany.sca.monitor.ValidationException: " + receivedMessage;
+ }
if (expectedMessage == null){
writeMissingMessage(testName, ex);
|