stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravihansa3000 <...@git.apache.org>
Subject [GitHub] stratos pull request: implementing STRATOS-1628
Date Sat, 21 Nov 2015 14:21:43 GMT
Github user ravihansa3000 commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/492#discussion_r45546596
  
    --- Diff: components/org.apache.stratos.mock.iaas.client/src/main/java/org/apache/stratos/mock/iaas/client/MockIaasApiClient.java
---
    @@ -48,6 +49,20 @@ public MockIaasApiClient(String endpoint) {
             this.endpoint = endpoint;
         }
     
    +    public boolean isMockIaaSReady() {
    +        try {
    +            URI uri = new URIBuilder(endpoint + INIT_CONTEXT).build();
    +            HttpResponse response = restClient.doGet(uri);
    +            if (response != null) {
    +                return response.getStatusCode() == 200;
    +            }
    +            throw new RuntimeException("An unknown error occurred");
    --- End diff --
    
    how about returning false instead of throwing an exception here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message