<commit_before>package org.mariadb.jdbc;

import org.junit.Test;
import org.mariadb.jdbc.internal.failover.impl.AuroraListener;
import org.mariadb.jdbc.internal.util.pool.GlobalStateInfo;

import java.sql.SQLException;

import static org.junit.Assert.assertEquals;

public class AuroraListenerTest {

    public static final String EXPECTED_CLUSTER_DNS_SUFFIX = "ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com";

    @Test
    public void testWithWriterCluster() throws SQLException {
        GlobalStateInfo globalInfo = new GlobalStateInfo();
        UrlParser urlParser = UrlParser.parse("jdbc:mysql:aurora://XXXX.cluster-ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com:3306/XXXX");
        AuroraListener listener = new AuroraListener(urlParser, globalInfo);

        assertEquals(listener.getClusterDnsSuffix(), EXPECTED_CLUSTER_DNS_SUFFIX);
    }

    @Test
    public void testWithReaderCluster() throws SQLException {
        GlobalStateInfo globalInfo = new GlobalStateInfo();
        UrlParser urlParser = UrlParser.parse("jdbc:mysql:aurora://XXXX.cluster-ro-ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com:3306/XXXX");
        AuroraListener listener = new AuroraListener(urlParser, globalInfo);

        assertEquals(listener.getClusterDnsSuffix(), EXPECTED_CLUSTER_DNS_SUFFIX);
    }
}<commit_msg>[CONJ-767] permit using Aurora RO endpoint - code style correction after merge<commit_after>package org.mariadb.jdbc;

import static org.junit.Assert.assertEquals;

import java.sql.SQLException;
import org.junit.Test;
import org.mariadb.jdbc.internal.failover.impl.AuroraListener;
import org.mariadb.jdbc.internal.util.pool.GlobalStateInfo;

public class AuroraListenerTest {

  public static final String EXPECTED_CLUSTER_DNS_SUFFIX =
      "ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com";

  @Test
  public void testWithWriterCluster() throws SQLException {
    GlobalStateInfo globalInfo = new GlobalStateInfo();
    UrlParser urlParser =
        UrlParser.parse(
            "jdbc:mysql:aurora://XXXX.cluster-ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com:3306/XXXX");
    AuroraListener listener = new AuroraListener(urlParser, globalInfo);

    assertEquals(listener.getClusterDnsSuffix(), EXPECTED_CLUSTER_DNS_SUFFIX);
  }

  @Test
  public void testWithReaderCluster() throws SQLException {
    GlobalStateInfo globalInfo = new GlobalStateInfo();
    UrlParser urlParser =
        UrlParser.parse(
            "jdbc:mysql:aurora://XXXX.cluster-ro-ZZZZZZZZZZZZ.us-east-1.rds.amazonaws.com:3306/XXXX");
    AuroraListener listener = new AuroraListener(urlParser, globalInfo);

    assertEquals(listener.getClusterDnsSuffix(), EXPECTED_CLUSTER_DNS_SUFFIX);
  }
}
{'fraction_non_alphanumeric': 0.09901738473167045, 'fraction_numerical': 0.00944822373393802, 'mean_word_length': 4.5961945031712474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '4888522', 'n_tokens_mistral': 865, 'n_tokens_neox': 829, 'n_words': 136}