You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by he...@apache.org on 2012/10/05 22:56:55 UTC
svn commit: r1394808 -
/airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java
Author: heshan
Date: Fri Oct 5 20:56:55 2012
New Revision: 1394808
URL: http://svn.apache.org/viewvc?rev=1394808&view=rev
Log:
Fix for test failures.
Modified:
airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java
Modified: airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java?rev=1394808&r1=1394807&r2=1394808&view=diff
==============================================================================
--- airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java (original)
+++ airavata/trunk/modules/test-suite/src/test/java/org/apache/airavata/test/suite/gfac/GramProviderTest.java Fri Oct 5 20:56:55 2012
@@ -59,7 +59,8 @@ import org.junit.Test;
public class GramProviderTest {
public static final String MYPROXY = "myproxy";
- public static final String GRAM_PROPERTIES = "gram.properties";
+// public static final String GRAM_PROPERTIES = "gram.properties";
+ public static final String GRAM_PROPERTIES = "gram-ranger.properties";
private AiravataRegistry2 jcrRegistry = null;
@Before
@@ -133,9 +134,26 @@ public class GramProviderTest {
/*
* Save to registry
*/
- jcrRegistry.addHostDescriptor(host);
- jcrRegistry.addApplicationDescriptor(serv.getType().getName(), host.getType().getHostName(), appDesc);
- jcrRegistry.addServiceDescriptor(serv);
+
+ jcrRegistry.getApplicationDescriptors(serv.getType().getName());
+
+ if(jcrRegistry.isHostDescriptorExists(host.getType().getHostName())) {
+ jcrRegistry.updateHostDescriptor(host);
+ } else {
+ jcrRegistry.addHostDescriptor(host);
+ }
+
+ if (jcrRegistry.isApplicationDescriptorExists(serv.getType().getName(),host.getType().getHostName(),appDesc.getType().getApplicationName().getStringValue())){
+ jcrRegistry.updateApplicationDescriptor(serv.getType().getName(), host.getType().getHostName(), appDesc);
+ } else {
+ jcrRegistry.addApplicationDescriptor(serv.getType().getName(), host.getType().getHostName(), appDesc);
+ }
+
+ if (jcrRegistry.isServiceDescriptorExists(serv.getType().getName())){
+ jcrRegistry.updateServiceDescriptor(serv);
+ } else {
+ jcrRegistry.addServiceDescriptor(serv);
+ }
// jcrRegistry.deployServiceOnHost(serv.getType().getName(), host.getType().getHostName());
}