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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to