old_contents: import logging
  from uuid import uuid4
  import os
  
  from hazelcast.config import ClientConfig, PROTOCOL
  
  
  def random_string():
      return str(uuid4())
  
  
  def configure_logging(log_level=logging.INFO):
      logging.basicConfig(format='%(asctime)s%(msecs)03d [%(threadName)s][%(name)s] %(levelname)s: %(message)s', datefmt="%H:%M:%S,")
      logging.getLogger().setLevel(log_level)
  
  
  def event_collector():
      events = []
  
      def collector(e):
          events.append(e)
  
      collector.events = events
      return collector
  
  
  def is_oss():
      return (os.getenv("SERVER_TYPE") == "oss") \
             or (os.getenv("HZ_TYPE") == "oss") \
             or ("HAZELCAST_ENTERPRISE_KEY" not in os.environ)
  
  
  def fill_map(map, size=10, key_prefix="key", value_prefix="val"):
      entries = dict()
      for i in range(size):
          entries[key_prefix + str(i)] = value_prefix + str(i)
      map.put_all(entries)
  
  
  def get_ssl_config(enable_ssl=False,
                     cafile=None,
                     certfile=None,
                     keyfile=None,
                     password=None,
                     protocol=PROTOCOL.TLS,
                     check_hostname=None,
                     ciphers=None,
                     attempt_limit=1,
                     timeout=1):
      config = ClientConfig()
  
      config.network_config.ssl_config.enabled = enable_ssl
      config.network_config.ssl_config.cafile = cafile
      config.network_config.ssl_config.certfile = certfile
      config.network_config.ssl_config.keyfile = keyfile
      config.network_config.ssl_config.password = password
      config.network_config.ssl_config.protocol = protocol
      config.network_config.ssl_config.check_hostname = check_hostname
      config.network_config.ssl_config.ciphers = ciphers
  
      config.network_config.connection_attempt_limit = attempt_limit
      config.network_config.connection_timeout = timeout
      return config
  
  
  def get_abs_path(cur_dir, file_name):
      return os.path.abspath(os.path.join(cur_dir, file_name))
  
  
  def generate_key_owned_by_instance(client, instance):
      while True:
          key = random_string()
          partition_id = client.partition_service.get_partition_id(key)
          if client.partition_service.get_partition_owner(partition_id) == instance:
              return key
  
new_contents: import logging
  from uuid import uuid4
  import os
  
  from hazelcast.config import ClientConfig, PROTOCOL
  
  
  def random_string():
      return str(uuid4())
  
  
  def configure_logging(log_level=logging.INFO):
      logging.basicConfig(format='%(asctime)s%(msecs)03d [%(threadName)s][%(name)s] %(levelname)s: %(message)s', datefmt="%H:%M:%S,")
      logging.getLogger().setLevel(log_level)
  
  
  def event_collector():
      events = []
  
      def collector(e):
          events.append(e)
  
      collector.events = events
      return collector
  
  
  def is_oss():
      return (os.getenv("SERVER_TYPE") == "oss") \
             or (os.getenv("HZ_TYPE") == "oss") \
             or ("HAZELCAST_ENTERPRISE_KEY" not in os.environ)
  
  
  def fill_map(map, size=10, key_prefix="key", value_prefix="val"):
      entries = dict()
      for i in range(size):
          entries[key_prefix + str(i)] = value_prefix + str(i)
      map.put_all(entries)
  
  
  def get_ssl_config(enable_ssl=False,
                     cafile=None,
                     certfile=None,
                     keyfile=None,
                     password=None,
                     protocol=PROTOCOL.TLS,
                     check_hostname=None,
                     ciphers=None,
                     attempt_limit=1):
      config = ClientConfig()
  
      config.network_config.ssl_config.enabled = enable_ssl
      config.network_config.ssl_config.cafile = cafile
      config.network_config.ssl_config.certfile = certfile
      config.network_config.ssl_config.keyfile = keyfile
      config.network_config.ssl_config.password = password
      config.network_config.ssl_config.protocol = protocol
      config.network_config.ssl_config.check_hostname = check_hostname
      config.network_config.ssl_config.ciphers = ciphers
  
      config.network_config.connection_attempt_limit = attempt_limit
      return config
  
  
  def get_abs_path(cur_dir, file_name):
      return os.path.abspath(os.path.join(cur_dir, file_name))
  
  
  def generate_key_owned_by_instance(client, instance):
      while True:
          key = random_string()
          partition_id = client.partition_service.get_partition_id(key)
          if client.partition_service.get_partition_owner(partition_id) == instance:
              return key
  
subject: increase connection timeout for SSL tests from 1 seconds to 5 seconds (#123)