<commit_before>package com.sksamuel.elastic4s.requests.cluster

import com.sksamuel.elastic4s.testkit.DockerTests
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpec}
import org.scalatest.PartialFunctionValues._

class ClusterInfoTest extends WordSpec with Matchers with DockerTests with BeforeAndAfterAll {

  override protected def afterAll(): Unit = {
    client.execute {
      addRemoteClusterRequest(Map("search.remote.cluster_one.seeds" → null, "search.remote.cluster_two.seeds" → null))
    }.await
  }

  client.execute {
    addRemoteClusterRequest(Map(
      "search.remote.cluster_one.seeds" → "127.0.0.1:9300, 127.0.0.2:9300",
      "search.remote.cluster_two.seeds" → "127.0.0.3:9300"))
  }.await

  "remote cluster info request" should {
    "return remote cluster information" in {

      val info = client.execute {
        remoteClusterInfo()
      }.await.result

      info.valueAt("cluster_one") should have(
        'seeds (Seq("127.0.0.1:9300", "127.0.0.2:9300")),
        'maxConnectionsPerCluster (3),
        'initialConnectTimeout ("30s"),
        'skipUnavailable (false)
      )

      info.valueAt("cluster_two") should have(
        'seeds (Seq.empty),
        'httpAddresses (Seq.empty),
        'connected (false),
        'numNodesConnected (0),
        'maxConnectionsPerCluster (3),
        'initialConnectTimeout ("30s"),
        'skipUnavailable (false))
    }
  }

}<commit_msg>fixed assertions for second cluster info<commit_after>package com.sksamuel.elastic4s.requests.cluster

import com.sksamuel.elastic4s.testkit.DockerTests
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpec}
import org.scalatest.PartialFunctionValues._

class ClusterInfoTest extends WordSpec with Matchers with DockerTests with BeforeAndAfterAll {

  override protected def afterAll(): Unit = {
    client.execute {
      addRemoteClusterRequest(Map("search.remote.cluster_one.seeds" → null, "search.remote.cluster_two.seeds" → null))
    }.await
  }

  client.execute {
    addRemoteClusterRequest(Map(
      "search.remote.cluster_one.seeds" → "127.0.0.1:9300, 127.0.0.2:9300",
      "search.remote.cluster_two.seeds" → "127.0.0.3:9300"))
  }.await

  "remote cluster info request" should {
    "return remote cluster information" in {

      val info = client.execute {
        remoteClusterInfo()
      }.await.result

      info.valueAt("cluster_one") should have(
        'seeds (Seq("127.0.0.1:9300", "127.0.0.2:9300")),
        'maxConnectionsPerCluster (3),
        'initialConnectTimeout ("30s"),
        'skipUnavailable (false)
      )

      info.valueAt("cluster_two") should have(
        'connected (false),
        'numNodesConnected (0),
        'maxConnectionsPerCluster (3),
        'initialConnectTimeout ("30s"),
        'skipUnavailable (false))
    }
  }

}
{'fraction_non_alphanumeric': 0.12442232492001422, 'fraction_numerical': 0.04194809811589051, 'mean_word_length': 3.2896341463414633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, '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': '3233382', 'n_tokens_mistral': 960, 'n_tokens_neox': 895, 'n_words': 175}