Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1287

Custom/Default configuration for Connection/SO/Request Timeout properties are not working as expected using overrides()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.1
    • None
    • jclouds-core

    Description

      I am using overrides method to set the following timeout properties. But timeout is not happening in 30 secs. I understand that the default values for these properties is 60 secs. But timeout happening after almost 300 secs.

      I also understand that these proeprties have to be set in millisecs. So method CommonUtil.getTimeOutInMilliSeconds() returns 30000.

      return ContextBuilder.newBuilder(providerOrAPI)
                      .endpoint(getEndPointUrl(osLogin))
                      .modules(getModules())
                      .overrides(getOverrides())
                      .credentials(osLogin.getTenantName() + CBVnfmConstants.COLON + osLogin.getUserName(),
                              osLogin.getPassword())
                      .buildApi(type);
      
      private Properties getOverrides() {
              Properties overrides = new Properties();
              overrides.setProperty(Constants.PROPERTY_SO_TIMEOUT, CommonUtil.getTimeOutInMilliSeconds() + "");
              overrides.setProperty(Constants.PROPERTY_CONNECTION_TIMEOUT, CommonUtil.getTimeOutInMilliSeconds() + "");
              overrides.setProperty(Constants.PROPERTY_REQUEST_TIMEOUT, CommonUtil.getTimeOutInMilliSeconds() + "");
              return overrides;
          }
      
      private Set<? extends Module> getModules() {
              Set<? extends Module> modules = ImmutableSet.of(new ApacheHCHttpCommandExecutorServiceModule(), new Log4JLoggingModule());
              return modules;
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            vadavi Pavan Vadavi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: