<commit_before>package com.twitter.finagle.mysql.harness

import com.twitter.conversions.DurationOps._
import com.twitter.finagle.Mysql
import com.twitter.finagle.mysql.Client
import com.twitter.finagle.mysql.harness.config.InstanceConfig
import com.twitter.finagle.mysql.harness.config.User
import com.twitter.logging.Logger
import com.twitter.util.Await
import com.twitter.util.Duration
import com.twitter.util.Future
import com.twitter.util.Return
import com.twitter.util.Throw
import com.twitter.util.Try
import java.io.File
import java.io.IOException
import java.net.InetAddress
import java.net.ServerSocket
import java.nio.file.Files
import java.nio.file.Path
import java.util.UUID
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicBoolean
import java.util.function.Function
import scala.reflect.io.Directory
import scala.sys.process.Process

/**
 * Manages lifecycle of the embedded mysql instance.
 */
object EmbeddedInstance {
  val SocketParamName = "--socket="
  val SetupTeardownTimeout: Duration = 5.seconds

  val log: Logger = Logger.get()

  // EmbeddedInstance is cached by InstanceConfig in order to ensure 1 instance for all
  // tests. This will prevent multiple instances of the same mysql version to be spawned affecting
  // performance and memory.
  private val instanceCache: ConcurrentHashMap[InstanceConfig, EmbeddedInstance] =
    new ConcurrentHashMap[InstanceConfig, EmbeddedInstance]()

  private def getServerParameters(
    config: InstanceConfig,<commit_msg>[finagle-mysql] increase mysql test harness timeout<commit_after>package com.twitter.finagle.mysql.harness

import com.twitter.conversions.DurationOps._
import com.twitter.finagle.Mysql
import com.twitter.finagle.mysql.Client
import com.twitter.finagle.mysql.harness.config.InstanceConfig
import com.twitter.finagle.mysql.harness.config.User
import com.twitter.logging.Logger
import com.twitter.util.Await
import com.twitter.util.Duration
import com.twitter.util.Future
import com.twitter.util.Return
import com.twitter.util.Throw
import com.twitter.util.Try
import java.io.File
import java.io.IOException
import java.net.InetAddress
import java.net.ServerSocket
import java.nio.file.Files
import java.nio.file.Path
import java.util.UUID
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicBoolean
import java.util.function.Function
import scala.reflect.io.Directory
import scala.sys.process.Process

/**
 * Manages lifecycle of the embedded mysql instance.
 */
object EmbeddedInstance {
  val SocketParamName = "--socket="
  val SetupTeardownTimeout: Duration = 30.seconds

  val log: Logger = Logger.get()

  // EmbeddedInstance is cached by InstanceConfig in order to ensure 1 instance for all
  // tests. This will prevent multiple instances of the same mysql version to be spawned affecting
  // performance and memory.
  private val instanceCache: ConcurrentHashMap[InstanceConfig, EmbeddedInstance] =
    new ConcurrentHashMap[InstanceConfig, EmbeddedInstance]()

  private def getServerParameters(
    config: InstanceConfig,
{'fraction_non_alphanumeric': 0.08233774620600581, 'fraction_numerical': 0.0016144656118824668, 'mean_word_length': 5.110453648915187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3024808', 'n_tokens_mistral': 871, 'n_tokens_neox': 867, 'n_words': 232}