@Test public void testAutoSkipFailureDisabled() { Blueprint blueprint = new BlueprintImpl("test", hostGroups, stack, configuration, null, setting); HashMap<String, String> skipFailureSetting = new HashMap<>(); skipFailureSetting.put(Setting.SETTING_NAME_SKIP_FAILURE, "false"); expect(setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS)).andReturn(Collections.singleton(skipFailureSetting)); replay(stack, setting); assertFalse(blueprint.shouldSkipFailure()); verify(stack, setting); }
@Override public boolean shouldSkipFailure() { if (setting == null) { return false; } Set<HashMap<String, String>> settingValue = setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS); for (Map<String, String> setting : settingValue) { if (setting.containsKey(Setting.SETTING_NAME_SKIP_FAILURE)) { return setting.get(Setting.SETTING_NAME_SKIP_FAILURE).equalsIgnoreCase("true"); } } return false; }
BlueprintImpl implements Blueprint { @Override public boolean shouldSkipFailure() { if (setting == null) { return false; } Set<HashMap<String, String>> settingValue = setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS); for (Map<String, String> setting : settingValue) { if (setting.containsKey(Setting.SETTING_NAME_SKIP_FAILURE)) { return setting.get(Setting.SETTING_NAME_SKIP_FAILURE).equalsIgnoreCase("true"); } } return false; } }
BlueprintImpl implements Blueprint { @Override public boolean shouldSkipFailure() { if (setting == null) { return false; } Set<HashMap<String, String>> settingValue = setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS); for (Map<String, String> setting : settingValue) { if (setting.containsKey(Setting.SETTING_NAME_SKIP_FAILURE)) { return setting.get(Setting.SETTING_NAME_SKIP_FAILURE).equalsIgnoreCase("true"); } } return false; } BlueprintImpl(BlueprintEntity entity);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security, Setting setting); }
BlueprintImpl implements Blueprint { @Override public boolean shouldSkipFailure() { if (setting == null) { return false; } Set<HashMap<String, String>> settingValue = setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS); for (Map<String, String> setting : settingValue) { if (setting.containsKey(Setting.SETTING_NAME_SKIP_FAILURE)) { return setting.get(Setting.SETTING_NAME_SKIP_FAILURE).equalsIgnoreCase("true"); } } return false; } BlueprintImpl(BlueprintEntity entity);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security, Setting setting); String getName(); String getStackName(); String getStackVersion(); SecurityConfiguration getSecurity(); @Override Map<String, HostGroup> getHostGroups(); @Override HostGroup getHostGroup(String name); @Override Configuration getConfiguration(); @Override Setting getSetting(); @Override Collection<String> getServices(); @Override Collection<String> getComponents(String service); @Override String getRecoveryEnabled(String serviceName, String componentName); @Override String getCredentialStoreEnabled(String serviceName); @Override boolean shouldSkipFailure(); @Override Stack getStack(); @Override Collection<HostGroup> getHostGroupsForComponent(String component); @Override Collection<HostGroup> getHostGroupsForService(String service); @Override void validateTopology(); BlueprintEntity toEntity(); @Override void validateRequiredProperties(); }
BlueprintImpl implements Blueprint { @Override public boolean shouldSkipFailure() { if (setting == null) { return false; } Set<HashMap<String, String>> settingValue = setting.getSettingValue(Setting.SETTING_NAME_DEPLOYMENT_SETTINGS); for (Map<String, String> setting : settingValue) { if (setting.containsKey(Setting.SETTING_NAME_SKIP_FAILURE)) { return setting.get(Setting.SETTING_NAME_SKIP_FAILURE).equalsIgnoreCase("true"); } } return false; } BlueprintImpl(BlueprintEntity entity);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security);  BlueprintImpl(String name, Collection<HostGroup> groups, Stack stack, Configuration configuration,
                       SecurityConfiguration security, Setting setting); String getName(); String getStackName(); String getStackVersion(); SecurityConfiguration getSecurity(); @Override Map<String, HostGroup> getHostGroups(); @Override HostGroup getHostGroup(String name); @Override Configuration getConfiguration(); @Override Setting getSetting(); @Override Collection<String> getServices(); @Override Collection<String> getComponents(String service); @Override String getRecoveryEnabled(String serviceName, String componentName); @Override String getCredentialStoreEnabled(String serviceName); @Override boolean shouldSkipFailure(); @Override Stack getStack(); @Override Collection<HostGroup> getHostGroupsForComponent(String component); @Override Collection<HostGroup> getHostGroupsForService(String service); @Override void validateTopology(); BlueprintEntity toEntity(); @Override void validateRequiredProperties();  }