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/23 14:24:41 UTC

[airavata] branch develop 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 develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new d55d706  AIRAVATA-2960 Trigger dynamic enhancement of rep catalog entities
d55d706 is described below

commit d55d7066f9002d8ca19e3b72efe353a12daa5caf
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
+}