/** * Applies the kubernetes json url to the configuration. * @param configuration The target configuration object. * @param map The arquillian configuration. */ private static void applyDependencies(Configuration configuration, Map<String, String> map) throws MalformedURLException { if (map.containsKey(DEPENDENCIES)) { configuration.dependencies = Strings.splitAndTrimAsList(map.get(DEPENDENCIES), " "); } }
private static void configureProtocolHandlers(Map<String, String> conf) { Set<String> handlers = new LinkedHashSet<>(); handlers.addAll(Strings.splitAndTrimAsList(System.getProperty(JAVA_PROTOCOL_HANDLER, ""), " ")); handlers.addAll(Strings.splitAndTrimAsList(conf.containsKey(PROTOCOL_HANDLERS) ? conf.get(PROTOCOL_HANDLERS) : DEFAULT_MAVEN_PROTOCOL_HANDLER, " ")); System.setProperty(JAVA_PROTOCOL_HANDLER, Strings.join(handlers, " ")); } }
private static void configureProtocolHandlers(Map<String, String> conf) { Set<String> handlers = new LinkedHashSet<>(); handlers.addAll(Strings.splitAndTrimAsList(System.getProperty(JAVA_PROTOCOL_HANDLER, ""), " ")); handlers.addAll(Strings.splitAndTrimAsList(conf.containsKey(PROTOCOL_HANDLERS) ? conf.get(PROTOCOL_HANDLERS) : DEFAULT_MAVEN_PROTOCOL_HANDLER, " ")); System.setProperty(JAVA_PROTOCOL_HANDLER, Strings.join(handlers, " ")); } }
public static Configuration fromMap(Map<String, String> map) { Configuration configuration = new Configuration(); try { applyMasterUrl(configuration, map); applyConfigurationURL(configuration, map); applyDependencies(configuration, map); configuration.timeout = getLongProperty(TIMEOUT, map, DEFAULT_TIMEOUT); configuration.pollInterval = getLongProperty(POLL_INTERVAL, map, DEFAULT_POLL_INTERVAL); configuration.ansiLoggerEnabled = getBooleanProperty(ANSI_LOGGER_ENABLED, map, true); configuration.waitForServiceConnection = getBooleanProperty(WAIT_FOR_SERVICE_CONNECTION, map, true); configuration.waitForServices = Strings.splitAndTrimAsList(getStringProperty(WAIT_FOR_SERVICES, map, ""), " "); configuration.serviceConnectionTimeout = getLongProperty(SERVICE_CONNECTION_TIMEOUT, map, DEFAULT_SERVICE_CONNECTION_TIMEOUT); } catch (Throwable t) { throw new RuntimeException(t); } return configuration; }
configuration.environmentInitEnabled = getBooleanProperty(ENVIRONMENT_INIT_ENABLED, map, true); configuration.environmentConfigUrl = getKubernetesConfigurationUrl(map); configuration.environmentDependencies = Strings.splitAndTrimAsList(getStringProperty(ENVIRONMENT_DEPENDENCIES, map, ""), "\\s+"); configuration.waitForServiceList = Strings.splitAndTrimAsList(getStringProperty(WAIT_FOR_SERVICE_LIST, map, ""), "\\s+"); configuration.waitForServiceConnectionEnabled = getBooleanProperty(WAIT_FOR_SERVICE_CONNECTION_ENABLED, map, DEFAULT_WAIT_FOR_SERVICE_CONNECTION_ENABLED); configuration.waitForServiceConnectionTimeout = getLongProperty(WAIT_FOR_SERVICE_CONNECTION_TIMEOUT, map, DEFAULT_NAMESPACE_CLEANUP_TIMEOUT);