<commit_before>package com.ubirch.avatar.test.base

import com.ubirch.avatar.storage.StorageCleanup

import org.scalatest.{AsyncFeatureSpec, BeforeAndAfterAll, BeforeAndAfterEach, Matchers}

/**
  * author: cvandrei
  * since: 2017-02-28
  */
trait ElasticsearchSpecAsync extends AsyncFeatureSpec
  with Matchers
  with BeforeAndAfterEach
  with BeforeAndAfterAll
  with StorageCleanup {

  override protected def beforeEach(): Unit = {
    cleanElasticsearch()
    Thread.sleep(100)
  }

  override protected def afterAll(): Unit = {
    esClientClose()
    super.afterAll()
  }

}<commit_msg>UBI-143: fix connection closed issue with tests<commit_after>package com.ubirch.avatar.test.base

import com.ubirch.avatar.storage.StorageCleanup

import org.scalatest.{AsyncFeatureSpec, BeforeAndAfterAll, BeforeAndAfterEach, Matchers}

/**
  * author: cvandrei
  * since: 2017-02-28
  */
trait ElasticsearchSpecAsync extends AsyncFeatureSpec
  with Matchers
  with BeforeAndAfterEach
  with BeforeAndAfterAll
  with StorageCleanup {

  override protected def beforeEach(): Unit = {
    cleanElasticsearch()
    Thread.sleep(100)
  }

}
{'fraction_non_alphanumeric': 0.08584070796460178, 'fraction_numerical': 0.022123893805309734, 'mean_word_length': 4.544117647058823, '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': '4336269', 'n_tokens_mistral': 371, 'n_tokens_neox': 354, 'n_words': 77}