You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2016/10/26 13:52:52 UTC

[2/2] airavata git commit: Merge branch 'develop' into pr65

Merge branch 'develop' into pr65


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1d710c9d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1d710c9d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1d710c9d

Branch: refs/heads/develop
Commit: 1d710c9d85b2fd846ea8eaf81abc8dff62f69f6e
Parents: 8422d23 ccc708b
Author: Suresh Marru <sm...@apache.org>
Authored: Wed Oct 26 09:52:35 2016 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Wed Oct 26 09:52:35 2016 -0400

----------------------------------------------------------------------
 .../UserResourceProfile.java                    | 116 ++++++++++++++++++-
 .../catalog/impl/UsrResourceProfileImpl.java    |   2 +-
 .../util/AppCatalogThriftConversion.java        |   5 +
 .../app/catalog/UserResourceProfileTest.java    |  10 +-
 .../user_resource_profile_model.thrift          |   6 +-
 5 files changed, 132 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1d710c9d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/1d710c9d/modules/registry/registry-core/src/test/java/org/apache/airavata/app/catalog/UserResourceProfileTest.java
----------------------------------------------------------------------
diff --cc modules/registry/registry-core/src/test/java/org/apache/airavata/app/catalog/UserResourceProfileTest.java
index d85d24c,6764377..1e013e2
--- a/modules/registry/registry-core/src/test/java/org/apache/airavata/app/catalog/UserResourceProfileTest.java
+++ b/modules/registry/registry-core/src/test/java/org/apache/airavata/app/catalog/UserResourceProfileTest.java
@@@ -105,8 -97,14 +105,15 @@@ public class UserResourceProfileTest 
          uf.setUserComputeResourcePreferences(list);
          uf.setGatewayID("airavataPGA");
          uf.setUserId("Anuj");
 +        uf.setUserStoragePreferences(stList);
  
+         // Check if UserResourceProfile exists (should not exist)
+         // This tests the mechanism that PGA will use to figure out if a user doesn't already have a UserResourceProfile
+         UserResourceProfile checkUserResourceProfile = userProfile.getUserResourceProfile(uf.getUserId(), uf.getGatewayID());
+         assertNotNull(checkUserResourceProfile.getUserId());
+         assertNotNull(checkUserResourceProfile.getGatewayID());
+         assertTrue(checkUserResourceProfile.isIsNull());
+ 
          String gwId = userProfile.addUserResourceProfile(uf);
          UserResourceProfile retrievedProfile = null;
          //retrievedProfile = userProfile.getUserResourceProfile("hello",uf.getGatewayID());