You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2017/04/05 19:10:41 UTC
[17/50] [abbrv] airavata git commit: Reduce bound for randomly
generated ID values in samples
Reduce bound for randomly generated ID values in samples
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0e9c08f1
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0e9c08f1
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0e9c08f1
Branch: refs/heads/develop
Commit: 0e9c08f17c7c590fef8fc39db9fe9a8a9860b673
Parents: bacc2bf
Author: Gourav Shenoy <sh...@gmail.com>
Authored: Mon Apr 3 17:15:16 2017 -0400
Committer: Gourav Shenoy <sh...@gmail.com>
Committed: Mon Apr 3 17:15:16 2017 -0400
----------------------------------------------------------------------
.../service/profile/client/samples/TenantProfileSample.java | 2 +-
.../service/profile/client/samples/UserProfileSample.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e9c08f1/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
index 66c6e56..51ee6a0 100644
--- a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
+++ b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/TenantProfileSample.java
@@ -38,7 +38,7 @@ public class TenantProfileSample {
private static Gateway getGateway(String gatewayId) {
// get random value for userId
- int gatewayIdValue = ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE);
+ int gatewayIdValue = ThreadLocalRandom.current().nextInt(1000);
if (gatewayId != null) {
gatewayIdValue = Integer.parseInt(gatewayId.replaceAll("test-gateway-", ""));
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e9c08f1/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/UserProfileSample.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/UserProfileSample.java b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/UserProfileSample.java
index 5b6b5b1..2e1b879 100644
--- a/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/UserProfileSample.java
+++ b/airavata-services/profile-service/profile-service-client-sdks/java-client-samples/src/main/java/org/apache/airavata/service/profile/client/samples/UserProfileSample.java
@@ -21,7 +21,7 @@ public class UserProfileSample {
private static final Logger logger = LoggerFactory.getLogger(UserProfileSample.class);
private static UserProfileService.Client userProfileClient;
private static String testUserId = null;
- private static String testGatewayId = "test-client-gateway";
+ private static String testGatewayId = "test-gateway-1830144881";
/**
* Performs the following operations in sequence:
@@ -90,7 +90,7 @@ public class UserProfileSample {
private static UserProfile getUserProfile(String userId) {
// get random value for userId
- int userIdValue = ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE);
+ int userIdValue = ThreadLocalRandom.current().nextInt(1000);
if (userId != null) {
userIdValue = Integer.parseInt(userId.replaceAll("test-user-", ""));