<commit_before>package com.gigaspaces.sbp.gstest

import com.j_spaces.core.client.SQLQuery
import org.scalatest.{BeforeAndAfterAllConfigMap, ConfigMap}
import org.springframework.context.support.ClassPathXmlApplicationContext
import org.scalatest.ShouldMatchers
import org.openspaces.core.GigaSpace
import org.slf4j.Logger

/** User: jason
  * Date: 5/27/14
  * Time: 6:10 PM
  */
abstract class EmbeddedSinglePartitionSuite
  extends GsI10nSuite
  with BeforeAndAfterAllConfigMap
  with ShouldMatchers {

  lazy val clientContext: ClassPathXmlApplicationContext = loadContext()

  implicit val gigaSpace: GigaSpace
  implicit val logger: Logger

  val spaceName = getClass.getSimpleName
  val numPartitions = 1
  val defaultsMap = Map[String, Any](
    schemaProperty -> "partitioned-sync2backup"
    , numInstancesProperty -> int2Integer(numPartitions)
    , numBackupsProperty -> int2Integer(0)
    , instanceIdProperty -> int2Integer(1)
    , spaceUrlProperty -> s"/./$spaceName"
    , spaceModeProperty -> SpaceMode.Embedded
    , configLocationProperty -> s"classpath:${spaceName}Server.xml"
    , localViewQueryListProperty -> List[SQLQuery[_]]()
  )
  val defaultConfigMap = new ConfigMap(defaultsMap)

  // SETUP METHODS
  override def beforeAll(cm: ConfigMap): Unit = {
    logger.debug("beforeAll in ESPS")
    logger.debug(s"SPACE NAME WILL BE: $spaceName")
    setupWith(defaultConfigMap)
  }

  // HELPER METHODS
  def loadContext(descriptor: String = s"classpath:${spaceName}Client.xml"): ClassPathXmlApplicationContext = {
    new ClassPathXmlApplicationContext(descriptor)
  }<commit_msg>client server switch<commit_after>package com.gigaspaces.sbp.gstest

import com.j_spaces.core.client.SQLQuery
import org.scalatest.{BeforeAndAfterAllConfigMap, ConfigMap}
import org.springframework.context.support.ClassPathXmlApplicationContext
import org.scalatest.ShouldMatchers
import org.openspaces.core.GigaSpace
import org.slf4j.Logger

/** User: jason
  * Date: 5/27/14
  * Time: 6:10 PM
  */
abstract class EmbeddedSinglePartitionSuite
  extends GsI10nSuite
  with BeforeAndAfterAllConfigMap
  with ShouldMatchers {

  lazy val clientContext: ClassPathXmlApplicationContext = loadContext()

  implicit val gigaSpace: GigaSpace
  implicit val logger: Logger

  val spaceName = getClass.getSimpleName
  val numPartitions = 1
  val defaultsMap = Map[String, Any](
    schemaProperty -> "partitioned-sync2backup"
    , numInstancesProperty -> int2Integer(numPartitions)
    , numBackupsProperty -> int2Integer(0)
    , instanceIdProperty -> int2Integer(1)
    , spaceUrlProperty -> s"/./$spaceName"
    , spaceModeProperty -> SpaceMode.Embedded
    , configLocationProperty -> s"classpath:${spaceName}Client.xml"
    , localViewQueryListProperty -> List[SQLQuery[_]]()
  )
  val defaultConfigMap = new ConfigMap(defaultsMap)

  // SETUP METHODS
  override def beforeAll(cm: ConfigMap): Unit = {
    logger.debug("beforeAll in ESPS")
    logger.debug(s"SPACE NAME WILL BE: $spaceName")
    setupWith(defaultConfigMap)
  }

  // HELPER METHODS
  def loadContext(descriptor: String = s"classpath:${spaceName}Server.xml"): ClassPathXmlApplicationContext = {
    new ClassPathXmlApplicationContext(descriptor)
  }
{'fraction_non_alphanumeric': 0.0944979794839913, 'fraction_numerical': 0.011190550202051602, 'mean_word_length': 4.840290381125227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '261189', 'n_tokens_mistral': 1011, 'n_tokens_neox': 975, 'n_words': 200}