Configure selenium instance properties

        :param tc_config_prop_filenames: test case specific properties filenames
        :param behave_properties: dict with behave user data properties
435203
def configure_properties(self, tc_config_prop_filenames=None, behave_properties=None):
        
        prop_filenames = DriverWrappersPool.get_configured_value('Config_prop_filenames', tc_config_prop_filenames,
                                                                 'properties.cfg;local-properties.cfg')
        prop_filenames = [os.path.join(DriverWrappersPool.config_directory, filename) for filename in
                          prop_filenames.split(';')]
        prop_filenames = ';'.join(prop_filenames)

        # Configure config only if properties filename has changed
        if self.config_properties_filenames != prop_filenames:
            # Initialize the config object
            self.config = ExtendedConfigParser.get_config_from_file(prop_filenames)
            self.config_properties_filenames = prop_filenames

        # Override properties with system properties
        self.config.update_properties(os.environ)

        # Override properties with behave userdata properties
        if behave_properties:
            self.config.update_properties(behave_properties)
373318
def persist_config(run, session, cfg):
    
    from benchbuild.utils import schema as s

    for cfg_elem in cfg:
        session.add(
            s.Config(name=cfg_elem, value=cfg[cfg_elem], run_id=run.id))
925679
protected void configure(Properties properties) {
        _properties = properties;
        _recipients = properties.getProperty("mail.smtp.to").split(" *[,;] *");
        _authenticator = new Authenticator() {
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(_properties.getProperty("mail.smtp.user"), _properties.getProperty("mail.smtp.pass"));
            }
        };
    }
137097
private void configure(){
		addDecorator(ServiceStats.class, new ServiceStatsDecorator());
		addDecorator(ActionStats.class, new ActionStatsDecorator());
		addDecorator(ServletStats.class, new ServletStatsDecorator());
		addDecorator(FilterStats.class, new FilterStatsDecorator());
		addDecorator(CacheStats.class, new CacheStatsDecorator());
		addDecorator(StorageStats.class, new StorageStatsDecorator());
		addDecorator(MemoryStats.class, new MemoryStatsDecorator());
		addDecorator(MemoryPoolStats.class, new MemoryPoolStatsDecorator());
		addDecorator(VirtualMemoryPoolStats.class, new MemoryPoolStatsDecorator("VirtualMemoryPool"));
		addDecorator(ThreadCountStats.class, new ThreadCountDecorator());
		addDecorator(ThreadStateStats.class, new ThreadStatesDecorator());
		addDecorator(OSStats.class, new OSStatsDecorator());
		addDecorator(RuntimeStats.class, new RuntimeStatsDecorator());
		addDecorator(PageInBrowserStats.class, new PageInBrowserStatsDecorator());
		addDecorator(ErrorStats.class, new ErrorStatsDecorator());
		addDecorator(GCStats.class, new GCStatsDecorator());

		//counters
		addDecorator(CounterStats.class, new CounterStatsDecorator());
		addDecorator(MaleFemaleStats.class, new MaleFemaleStatsDecorator());
		addDecorator(GuestBasicPremiumStats.class, new GuestBasicPremiumStatsDecorator());

		//session
		addDecorator(SessionCountStats.class, new SessionCountDecorator());
	}
813391
def add_properties(self, filename):
        
        filename = os.path.expanduser(filename)
        if os.path.exists(filename):
            with open(filename, 'r') as yaml_file:
                self.update_properties(yaml.safe_load(yaml_file))
206080
def step_use_log_record_configuration(context):
    
    assert context.table, "REQUIRE: context.table"
    context.table.require_columns(["property", "value"])
    for row in context.table.rows:
        property_name = row["property"]
        value = row["value"]
        if property_name == "format":
            context.log_record_format = value
        elif property_name == "datefmt":
            context.log_record_datefmt = value
        else:
            raise KeyError("Unknown property=%s" % property_name)
387750
public void raVerifyConfiguration(ConfigProperties properties)
			throws InvalidConfigurationException {
		
		try {
			// get port
			Integer port = (Integer) properties.getProperty(SIP_PORT_BIND).getValue();
			// get host
			String stackAddress = (String) properties.getProperty(SIP_BIND_ADDRESS).getValue();
			if (stackAddress.equals("")) {
				stackAddress = this.getJBossAddress();
			}
			
			if(stackAddress!=null) {
			    // try to open socket
			    InetSocketAddress sockAddress = new InetSocketAddress(stackAddress,
					port);
			    try {
	                new DatagramSocket(sockAddress).close();
			    } catch(BindException e) {
			        // in case already bound
			    }
			}
			
			// check transports			
			String transports = (String) properties.getProperty(TRANSPORTS_BIND).getValue();
			String[] transportsArray = transports.split(",");
			boolean validTransports = true;
			if (transportsArray.length > 0) {
				for (String transport : transportsArray) {
					if (!allowedTransports.contains(transport.toLowerCase()))
						validTransports = false;
					break;
				}
			}
			else {
				validTransports = false;
			}
			if (!validTransports) {
				throw new IllegalArgumentException(TRANSPORTS_BIND+" config property with invalid value: "+transports);
			}
			
			// verify existence of sipra.properties file
			if (sipRaPropertiesLocation!=null) {
				File f = new File(sipRaPropertiesLocation);
				if (!f.exists() || f.isDirectory()) {
					throw new IllegalArgumentException(SIPRA_PROPERTIES_LOCATION+" config property points to non existing file: "+sipRaPropertiesLocation);
				}
			}
		}
		catch (Throwable e) {
			throw new InvalidConfigurationException(e.getMessage(),e);
		}
	}
940636
public void setConfiguration( Dictionary<?,?> properties ) {

		// Ignore iPojo properties
		final List<String> propertiesToSkip = Arrays.asList(
				"component",
				"felix.fileinstall.filename" );

		// Convert the dictionary into a map
		Map<String,String> map = new LinkedHashMap<> ();
		for( Enumeration<?> en = properties.keys(); en.hasMoreElements(); ) {

			Object key = en.nextElement();
			String keyAsString = String.valueOf( key );
			if( propertiesToSkip.contains( keyAsString ))
				continue;

			// "null" are not acceptable values in dictionaries
			// (OSGi often use Hash tables)
			Object value = properties.get( key );
			map.put( keyAsString, String.valueOf( value ));
		}

		// Invoked by iPojo => the messaging type is the right one in this method
		map.put( MessagingConstants.MESSAGING_TYPE_PROPERTY, FACTORY_RABBITMQ );
		setConfiguration( map );
	}
627687
def custom_properties(self, props):
        
        fprops = javabridge.make_instance("java/io/File", "(Ljava/lang/String;)V", props)
        javabridge.call(self.jobject, "setCustomPropsFile", "(Ljava/io/File;)V", fprops)
441589
private Properties getElementProperties(Map<String, Object> configProps, String elementName, String... attrKeys) {
        Properties properties = new Properties();
        for (String attrKey : attrKeys) {
            String value = (String) configProps.get(attrKey);
            if (value != null && value.length() > 0) {
                value = (String) getValue(value);
                properties.put(attrKey, value);
            }
        }

        if (properties.isEmpty() || properties.size() != attrKeys.length) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                //TODO: NLS warning msg
                Tr.debug(tc, "The authFilter element " + elementName + " specified in the server.xml file is missing one or more of these attributes "
                             + printAttrKeys(attrKeys));
            }
            return null;
        } else
            return properties;
    }
168884
def set_file_properties(ase, md5, timeout=None):
    # type: (blobxfer.models.azure.StorageEntity, str, int) -> None
    
    dir, fpath, _ = parse_file_path(ase.name)
    ase.client.set_file_properties(
        share_name=ase.container,
        directory_name=dir,
        file_name=fpath,
        content_settings=azure.storage.file.models.ContentSettings(
            content_type=blobxfer.util.get_mime_type(fpath),
            content_md5=md5,
            cache_control=ase.cache_control,
        ),
        timeout=timeout)
1264575
public void configure(Properties props) throws HibernateException {
		try{
			this.config = new BoneCPConfig(props);

			// old hibernate config
			String url = props.getProperty(CONFIG_CONNECTION_URL);
			String username = props.getProperty(CONFIG_CONNECTION_USERNAME);
			String password = props.getProperty(CONFIG_CONNECTION_PASSWORD);
			String driver = props.getProperty(CONFIG_CONNECTION_DRIVER_CLASS);
			if (url == null){
				url = props.getProperty(CONFIG_CONNECTION_URL_ALTERNATE);
			}
			if (username == null){
				username = props.getProperty(CONFIG_CONNECTION_USERNAME_ALTERNATE);
			}
			if (password == null){
				password = props.getProperty(CONFIG_CONNECTION_PASSWORD_ALTERNATE);
			}
			if (driver == null){
				driver = props.getProperty(CONFIG_CONNECTION_DRIVER_CLASS_ALTERNATE);
			}

			if (url != null){
				this.config.setJdbcUrl(url);
			}
			if (username != null){
				this.config.setUsername(username);
			}
			if (password != null){
				this.config.setPassword(password);
			}


			// Remember Isolation level
			this.isolation = ConfigurationHelper.getInteger(AvailableSettings.ISOLATION, props);
			this.autocommit = ConfigurationHelper.getBoolean(AvailableSettings.AUTOCOMMIT, props);

			logger.debug(this.config.toString());

			if (driver != null && !driver.trim().equals("")){
				loadClass(driver);
			}
			if (this.config.getConnectionHookClassName() != null){
				Object hookClass = loadClass(this.config.getConnectionHookClassName()).newInstance();
				this.config.setConnectionHook((ConnectionHook) hookClass);
			}
			// create the connection pool
			this.pool = createPool(this.config);
		} catch (Exception e) {
			throw new HibernateException(e);
		}
	}
1166257
protected static void configureEFapsProperties(final Context _compCtx,
                                                   final Map<String, String> _eFapsProps)
        throws StartupException
    {
        try {
            Util.bind(_compCtx, "env/" + INamingBinds.RESOURCE_CONFIGPROPERTIES, _eFapsProps);
        } catch (final NamingException e) {
            throw new StartupException("could not bind eFaps Properties '" + _eFapsProps + "'", e);
            // CHECKSTYLE:OFF
        } catch (final Exception e) {
            // CHECKSTYLE:ON
            throw new StartupException("could not bind eFaps Properties '" + _eFapsProps + "'", e);
        }
    }
1370416
private static void initializeProperties() {
        JMeterUtils.loadJMeterProperties(JMeterUtils.getJMeterHome()
                + File.separator
                + "bin" + File.separator
                + "jmeter.properties");

        //JMeterUtils.initLogging();
        JMeterUtils.initLocale();

        Properties jmeterProps = JMeterUtils.getJMeterProperties();

        // Add local JMeter properties, if the file is found
        String userProp = JMeterUtils.getPropDefault("user.properties", "");
        if (userProp.length() > 0) {
            FileInputStream fis = null;
            try {
                File file = JMeterUtils.findFile(userProp);
                if (file.canRead()) {
                    log.info("Loading user properties from: " + file.getCanonicalPath());
                    fis = new FileInputStream(file);
                    Properties tmp = new Properties();
                    tmp.load(fis);
                    jmeterProps.putAll(tmp);
                    LoggingManager.setLoggingLevels(jmeterProps);//Do what would be done earlier
                }
            } catch (IOException e) {
                log.warn("Error loading user property file: " + userProp, e);
            } finally {
                try {
                    if (fis != null) {
                        fis.close();
                    }
                } catch (IOException ex) {
                    log.warn("There was problem closing file stream", ex);
                }
            }
        }

        // Add local system properties, if the file is found
        String sysProp = JMeterUtils.getPropDefault("system.properties", "");
        if (sysProp.length() > 0) {
            FileInputStream fis = null;
            try {
                File file = JMeterUtils.findFile(sysProp);
                if (file.canRead()) {
                    log.info("Loading system properties from: " + file.getCanonicalPath());
                    fis = new FileInputStream(file);
                    System.getProperties().load(fis);
                }
            } catch (IOException e) {
                log.warn("Error loading system property file: " + sysProp, e);
            } finally {
                try {
                    if (fis != null) {
                        fis.close();
                    }
                } catch (IOException ex) {
                    log.warn("There was problem closing file stream", ex);
                }
            }
        }
    }
919458
def list_build_configuration_set_records(page_size=200, page_index=0, sort="", q=""):
    
    data = list_build_configuration_set_records_raw(page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
934999
private void setProperties(Properties properties) {
        Props props = new Props(properties);
        if(props.containsKey(BOOTSTRAP_URLS_PROPERTY)) {
            setBootstrapURLs(props.getList(BOOTSTRAP_URLS_PROPERTY));
        }

        if(props.containsKey(FAT_CLIENTS_CONFIG_SOURCE)) {
            setFatClientConfigSource(StoreClientConfigSource.get(props.getString(FAT_CLIENTS_CONFIG_SOURCE)));
        }

        if(props.containsKey(FAT_CLIENTS_CONFIG_FILE_PATH_PROPERTY)) {
            setFatClientConfigPath(props.getString(FAT_CLIENTS_CONFIG_FILE_PATH_PROPERTY));
        }

        if(props.containsKey(METADATA_CHECK_INTERVAL_IN_MS)) {
            setMetadataCheckIntervalInMs(props.getInt(METADATA_CHECK_INTERVAL_IN_MS));
        }

        if(props.containsKey(NETTY_SERVER_PORT)) {
            setServerPort(props.getInt(NETTY_SERVER_PORT));
        }

        if(props.containsKey(NETTY_SERVER_BACKLOG)) {
            setNettyServerBacklog(props.getInt(NETTY_SERVER_BACKLOG));
        }

        if(props.containsKey(COORDINATOR_CORE_THREADS)) {
            setCoordinatorCoreThreads(props.getInt(COORDINATOR_CORE_THREADS));
        }

        if(props.containsKey(COORDINATOR_MAX_THREADS)) {
            setCoordinatorMaxThreads(props.getInt(COORDINATOR_MAX_THREADS));
        }

        if(props.containsKey(COORDINATOR_QUEUED_REQUESTS)) {
            setCoordinatorQueuedRequestsSize(props.getInt(COORDINATOR_QUEUED_REQUESTS));
        }

        if(props.containsKey(HTTP_MESSAGE_DECODER_MAX_INITIAL_LINE_LENGTH)) {
            setHttpMessageDecoderMaxInitialLength(props.getInt(HTTP_MESSAGE_DECODER_MAX_INITIAL_LINE_LENGTH));
        }

        if(props.containsKey(HTTP_MESSAGE_DECODER_MAX_HEADER_SIZE)) {
            setHttpMessageDecoderMaxHeaderSize(props.getInt(HTTP_MESSAGE_DECODER_MAX_HEADER_SIZE));
        }

        if(props.containsKey(HTTP_MESSAGE_DECODER_MAX_CHUNK_SIZE)) {
            setHttpMessageDecoderMaxChunkSize(props.getInt(HTTP_MESSAGE_DECODER_MAX_CHUNK_SIZE));
        }

        if(props.containsKey(ADMIN_ENABLE)) {
            setAdminServiceEnabled(props.getBoolean(ADMIN_ENABLE));
        }

        if(props.containsKey(ADMIN_PORT)) {
            setAdminPort(props.getInt(ADMIN_PORT));
        }

    }
1048654
@SuppressWarnings("unchecked")
    public void raConfigure(ConfigProperties properties) {
        String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY)
                .getValue();
        if (httpClientFactoryClassName.isEmpty()) {
            maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue();

            maxForRoutes = new HashMap<HttpRoute, Integer>();

            defaultMaxForRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_FOR_ROUTE).getValue();

            String maxForRoutesString = (String) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_FOR_ROUTES)
                    .getValue();

            String[] maxForRoutesStrings = maxForRoutesString.split(",");

            for (String maxForRoute : maxForRoutesStrings) {
                if (maxForRoute.isEmpty()) {
                    continue;
                }
                String[] maxForRouteParts = maxForRoute.split(":");

                String scheme = maxForRouteParts[HTTP_SCHEME_INDEX];
                if (scheme == null || scheme.equals("")) {
                    scheme = HttpHost.DEFAULT_SCHEME_NAME;
                }

                String host = maxForRouteParts[HTTP_HOST_INDEX];

                String portStr = maxForRouteParts[HTTP_PORT_INDEX];
                if (portStr == null || portStr.equals("")) {
                    portStr = "80";
                }

                int port = Integer.parseInt(portStr);

                String maxForRoutePartsStr = maxForRouteParts[HTTP_MAXFORROUTE_INDEX];
                Integer max = Integer.valueOf(maxForRoutePartsStr);

                HttpRoute httpRoute = new HttpRoute(new HttpHost(host, port, scheme));

                maxForRoutes.put(httpRoute, max);
            }
        } else {
            try {
                httpClientFactory = ((Class<? extends HttpClientFactory>) Class.forName(httpClientFactoryClassName))
                        .newInstance();
            } catch (Exception e) {
                tracer.severe("failed to load http client factory class", e);
            }
        }
    }