You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2012/02/16 17:43:38 UTC

svn commit: r1245073 - in /incubator/airavata/trunk/modules/gfac-core/src: main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java

Author: lahiru
Date: Thu Feb 16 16:43:37 2012
New Revision: 1245073

URL: http://svn.apache.org/viewvc?rev=1245073&view=rev
Log:
fixing test failure and NPE.

Modified:
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java
    incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java?rev=1245073&r1=1245072&r2=1245073&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImpl.java Thu Feb 16 16:43:37 2012
@@ -252,6 +252,7 @@ public class PropertiesBasedServiceImpl 
 
     @Override
     public void postProcess(InvocationContext context) throws ServiceException {
+        if(this.registryService != null)
         ((JCRRegistry)this.registryService).closeConnection();
     }
 

Modified: incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java?rev=1245073&r1=1245072&r2=1245073&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java Thu Feb 16 16:43:37 2012
@@ -125,7 +125,13 @@ public class PropertiesBasedServiceImplT
 			DefaultExecutionContext ec = new DefaultExecutionContext();
 			ec.addNotifiable(new LoggingNotification());
 			ct.setExecutionContext(ec);
+             Map<String,String> config = new HashMap<String,String>();
+            config.put("org.apache.jackrabbit.repository.home","target");
+		    AiravataJCRRegistry jcrRegistry = new AiravataJCRRegistry(null,
+				"org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
+				"admin", config);
 
+            ec.setRegistryService(jcrRegistry);
 			ct.setServiceName("SimpleEcho");
 
 			/*