@Test
  public void connectTimeoutIsShortWhenAlerting() throws UnknownHostException {
    ConnectionTable connectionTable = mock(ConnectionTable.class);
    DistributionConfig distributionConfig = mock(DistributionConfig.class);
    TCPConduit tcpConduit = mock(TCPConduit.class);

    when(connectionTable.getConduit()).thenReturn(tcpConduit);
    when(connectionTable.getBufferPool()).thenReturn(mock(BufferPool.class));
    when(distributionConfig.getMemberTimeout()).thenReturn(100);
    when(tcpConduit.getSocketId()).thenReturn(new InetSocketAddress(getLocalHost(), 12345));

    Connection connection = new Connection(connectionTable, mock(Socket.class));

    int normalTimeout = connection.getP2PConnectTimeout(distributionConfig);
    assertThat(normalTimeout).isEqualTo(600);

    AlertingAction.execute(
        () -> assertThat(connection.getP2PConnectTimeout(distributionConfig)).isEqualTo(100));
  }
Test whether suspicion is raised about a member that closes its shared/unordered TCPConduit
connection
geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionTest.java