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/09/10 23:32:46 UTC
svn commit: r1383116 - in /incubator/airavata/trunk/modules/gfac-core/src:
main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java
test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java
Author: lahiru
Date: Mon Sep 10 21:32:46 2012
New Revision: 1383116
URL: http://svn.apache.org/viewvc?rev=1383116&view=rev
Log:
fixing build errors.
Modified:
incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java
incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java
Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java?rev=1383116&r1=1383115&r2=1383116&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/invocation/ExecutionContext.java Mon Sep 10 21:32:46 2012
@@ -58,7 +58,7 @@ public interface ExecutionContext {
/**
* Set Registry object.
*
- * @param AiravataRegistry
+ * @param AiravataRegistry2
* object to used.
*/
void setRegistryService(AiravataRegistry2 value);
Modified: incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java?rev=1383116&r1=1383115&r2=1383116&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/SchedulerTest.java Mon Sep 10 21:32:46 2012
@@ -34,7 +34,10 @@ import org.apache.airavata.core.gfac.pro
import org.apache.airavata.core.gfac.provider.impl.LocalProvider;
import org.apache.airavata.core.gfac.scheduler.Scheduler;
import org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl;
+import org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry;
+import org.apache.airavata.registry.api.AiravataRegistry2;
import org.apache.airavata.registry.api.impl.AiravataJCRRegistry;
+import org.apache.airavata.registry.api.util.RegistryUtils;
import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
import org.apache.airavata.schemas.gfac.InputParameterType;
import org.apache.airavata.schemas.gfac.OutputParameterType;
@@ -45,6 +48,7 @@ import org.junit.Test;
import java.io.File;
import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -53,7 +57,7 @@ import java.util.Map;
import static org.junit.Assert.fail;
public class SchedulerTest {
- private AiravataJCRRegistry jcrRegistry;
+ private AiravataRegistry2 jcrRegistry;
@Before
public void setUp() throws Exception {
/*
@@ -61,9 +65,7 @@ public class SchedulerTest {
*/
Map<String,String> config = new HashMap<String,String>();
config.put("org.apache.jackrabbit.repository.home","target");
- jcrRegistry = new AiravataJCRRegistry(null,
- "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
- "admin", config);
+ jcrRegistry = RegistryUtils.getRegistryFromConfig(new URL("test.properties"));
/*
* Host
@@ -124,13 +126,12 @@ public class SchedulerTest {
/*
* Save to registry
*/
- jcrRegistry.saveHostDescription(host);
- jcrRegistry.saveDeploymentDescription(serv.getType().getName(), host
+ jcrRegistry.addHostDescriptor(host);
+ jcrRegistry.addApplicationDescriptor(serv.getType().getName(), host
.getType().getHostName(), appDesc);
- jcrRegistry.saveServiceDescription(serv);
- jcrRegistry.deployServiceOnHost(serv.getType().getName(), host
- .getType().getHostName());
-
+ jcrRegistry.addServiceDescriptor(serv);
+// jcrRegistry.addApplicationDescriptor(serv.getType().getName(), host
+// .getType().getHostName());
}
@Test
@@ -172,7 +173,6 @@ public class SchedulerTest {
}else {
junit.framework.Assert.assertTrue(false);
}
- jcrRegistry.getSession().logout();
IOUtil.deleteDirectory(new File((new File(".")).getAbsolutePath() + File.separator + "target"));
} catch (Exception e) {