Class AbstractSimpleTransportTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.transport.AbstractSimpleTransportTestCase

public abstract class AbstractSimpleTransportTestCase
extends ESTestCase
  • Field Details

    • threadPool

      protected org.elasticsearch.threadpool.ThreadPool threadPool
    • version0

      protected static final org.elasticsearch.Version version0
    • nodeA

      protected volatile org.elasticsearch.cluster.node.DiscoveryNode nodeA
    • serviceA

      protected volatile MockTransportService serviceA
    • clusterSettingsA

      protected org.elasticsearch.common.settings.ClusterSettings clusterSettingsA
    • version1

      protected static final org.elasticsearch.Version version1
    • nodeB

      protected volatile org.elasticsearch.cluster.node.DiscoveryNode nodeB
    • serviceB

      protected volatile MockTransportService serviceB
  • Constructor Details

    • AbstractSimpleTransportTestCase

      public AbstractSimpleTransportTestCase()
  • Method Details

    • build

      protected abstract org.elasticsearch.transport.Transport build​(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.Version version, org.elasticsearch.common.settings.ClusterSettings clusterSettings, boolean doHandshake)
    • channelsPerNodeConnection

      protected int channelsPerNodeConnection()
    • getSupportedSettings

      protected java.util.Set<org.elasticsearch.common.settings.Setting<?>> getSupportedSettings()
    • setUp

      public void setUp() throws java.lang.Exception
      Overrides:
      setUp in class org.apache.lucene.util.LuceneTestCase
      Throws:
      java.lang.Exception
    • buildService

      protected MockTransportService buildService​(java.lang.String name, org.elasticsearch.Version version, org.elasticsearch.common.settings.Settings settings)
    • buildService

      protected MockTransportService buildService​(java.lang.String name, org.elasticsearch.Version version, org.elasticsearch.common.settings.ClusterSettings clusterSettings, org.elasticsearch.common.settings.Settings settings)
    • tearDown

      public void tearDown() throws java.lang.Exception
      Overrides:
      tearDown in class org.apache.lucene.util.LuceneTestCase
      Throws:
      java.lang.Exception
    • assertNumHandshakes

      public void assertNumHandshakes​(long expected, org.elasticsearch.transport.Transport transport)
    • assertNoPendingHandshakes

      public void assertNoPendingHandshakes​(org.elasticsearch.transport.Transport transport)
    • testHelloWorld

      public void testHelloWorld()
    • testThreadContext

      public void testThreadContext() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • testLocalNodeConnection

      public void testLocalNodeConnection() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • testMessageListeners

      public void testMessageListeners() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testVoidMessageCompressed

      public void testVoidMessageCompressed()
    • testHelloWorldCompressed

      public void testHelloWorldCompressed() throws java.io.IOException
      Throws:
      java.io.IOException
    • testErrorMessage

      public void testErrorMessage()
    • testDisconnectListener

      public void testDisconnectListener() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testConcurrentSendRespondAndDisconnect

      public void testConcurrentSendRespondAndDisconnect() throws java.util.concurrent.BrokenBarrierException, java.lang.InterruptedException
      Throws:
      java.util.concurrent.BrokenBarrierException
      java.lang.InterruptedException
    • testNotifyOnShutdown

      public void testNotifyOnShutdown() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTimeoutSendExceptionWithNeverSendingBackResponse

      public void testTimeoutSendExceptionWithNeverSendingBackResponse() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTimeoutSendExceptionWithDelayedResponse

      public void testTimeoutSendExceptionWithDelayedResponse() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTracerLog

      public void testTracerLog() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testVersionFrom0to1

      public void testVersionFrom0to1() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testVersionFrom1to0

      public void testVersionFrom1to0() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testVersionFrom1to1

      public void testVersionFrom1to1() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testVersionFrom0to0

      public void testVersionFrom0to0() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testMockFailToSendNoConnectRule

      public void testMockFailToSendNoConnectRule() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testMockUnresponsiveRule

      public void testMockUnresponsiveRule() throws java.io.IOException
      Throws:
      java.io.IOException
    • testHostOnMessages

      public void testHostOnMessages() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • testBlockingIncomingRequests

      public void testBlockingIncomingRequests() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testSendRandomRequests

      public void testSendRandomRequests() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • testRegisterHandlerTwice

      public void testRegisterHandlerTwice()
    • testTimeoutPerConnection

      public void testTimeoutPerConnection() throws java.io.IOException
      Throws:
      java.io.IOException
    • testHandshakeWithIncompatVersion

      public void testHandshakeWithIncompatVersion()
    • testHandshakeUpdatesVersion

      public void testHandshakeUpdatesVersion() throws java.io.IOException
      Throws:
      java.io.IOException
    • testKeepAlivePings

      public void testKeepAlivePings() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTcpHandshake

      public void testTcpHandshake()
    • testTcpHandshakeTimeout

      public void testTcpHandshakeTimeout() throws java.io.IOException
      Throws:
      java.io.IOException
    • testTcpHandshakeConnectionReset

      public void testTcpHandshakeConnectionReset() throws java.io.IOException, java.lang.InterruptedException
      Throws:
      java.io.IOException
      java.lang.InterruptedException
    • testResponseHeadersArePreserved

      public void testResponseHeadersArePreserved() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • testHandlerIsInvokedOnConnectionClose

      public void testHandlerIsInvokedOnConnectionClose() throws java.io.IOException, java.lang.InterruptedException
      Throws:
      java.io.IOException
      java.lang.InterruptedException
    • testConcurrentDisconnectOnNonPublishedConnection

      public void testConcurrentDisconnectOnNonPublishedConnection() throws java.io.IOException, java.lang.InterruptedException
      Throws:
      java.io.IOException
      java.lang.InterruptedException
    • testTransportStats

      public void testTransportStats() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testAcceptedChannelCount

      public void testAcceptedChannelCount() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTransportStatsWithException

      public void testTransportStatsWithException() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • testTransportProfilesWithPortAndHost

      public void testTransportProfilesWithPortAndHost()
    • testProfileSettings

      public void testProfileSettings()
    • testProfilesIncludesDefault

      public void testProfilesIncludesDefault()
    • testBindUnavailableAddress

      public void testBindUnavailableAddress()
    • testChannelCloseWhileConnecting

      public void testChannelCloseWhileConnecting()
    • testFailToSend

      public void testFailToSend() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • getLocalEphemeral

      protected java.net.InetSocketAddress getLocalEphemeral() throws java.net.UnknownHostException
      Throws:
      java.net.UnknownHostException
    • getAcceptedChannels

      protected java.util.Set<org.elasticsearch.transport.TcpChannel> getAcceptedChannels​(org.elasticsearch.transport.TcpTransport transport)