You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/01/22 23:54:04 UTC
[airavata] branch master updated: AIRAVATA-2960 Trigger dynamic
enhancement of rep catalog entities
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new 6353b29 AIRAVATA-2960 Trigger dynamic enhancement of rep catalog entities
6353b29 is described below
commit 6353b294b88590733d24ac997eb289bd5a80bde4
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jan 22 18:52:51 2019 -0500
AIRAVATA-2960 Trigger dynamic enhancement of rep catalog entities
---
.../org/apache/airavata/replica/catalog/ReplicaCatalogTest.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogTest.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogTest.java
index 7dfb73f..6ab2a3a 100644
--- a/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogTest.java
+++ b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogTest.java
@@ -20,8 +20,10 @@
package org.apache.airavata.replica.catalog;
import org.apache.airavata.replica.catalog.util.Initialize;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.model.data.replica.*;
import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.core.replica.catalog.utils.ReplicaCatalogJPAUtils;
import org.apache.airavata.registry.cpi.ReplicaCatalog;
import org.apache.airavata.registry.cpi.ReplicaCatalogException;
import org.junit.AfterClass;
@@ -41,11 +43,14 @@ public class ReplicaCatalogTest {
private static DataReplicaLocationModel replicaLocationModel;
@BeforeClass
- public static void setUp() {
+ public static void setUp() throws ApplicationSettingsException {
try {
System.out.println("********** SET UP ************");
initialize = new Initialize("replicacatalog-derby.sql");
initialize.initializeDB();
+ // Create EntityManagerFactory before any Entities to trigger
+ // dynamic enhancement of Entity classes
+ ReplicaCatalogJPAUtils.getEntityManager();
replicacatalog = RegistryFactory.getReplicaCatalog();
dataProductModel = new DataProductModel();
dataProductModel.setProductName("test-file.txt");
@@ -97,4 +102,4 @@ public class ReplicaCatalogTest {
Assert.fail();
}
}
-}
\ No newline at end of file
+}