Package org.apache.hadoop.hbase.http
Class TestHttpServerLifecycle
java.lang.Object
org.apache.hadoop.hbase.http.HttpServerFunctionalTest
org.apache.hadoop.hbase.http.TestHttpServerLifecycle
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
TEST_BUILD_WEBAPPS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
assertAlive
(org.apache.hadoop.hbase.http.HttpServer server) Check that a server is alive by probing theHttpServer.isAlive()
method and the text of its toString() descriptionprivate void
assertNotLive
(org.apache.hadoop.hbase.http.HttpServer server) private void
assertToStringContains
(org.apache.hadoop.hbase.http.HttpServer server, String text) Assert that the result ofHttpServer.toString()
contains the specific textvoid
Test that the server is alive once startedvoid
Test that the server is alive once startedvoid
Test that the server is not alive once stoppedvoid
Test that the server is not alive once stoppedvoid
void
Test that the server is alive once startedMethods inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
access, createAndStartTestServer, createServer, createServer, createServer, createServer, createServer, createTestServer, createTestServer, createTestServer, createTestServer, createTestServerWithSecurity, createTestServerWithSecurityAndAcl, deleteRecursively, getFreePort, getServerURL, prepareTestWebapp, readOutput, stop
-
Field Details
-
CLASS_RULE
-
-
Constructor Details
-
TestHttpServerLifecycle
public TestHttpServerLifecycle()
-
-
Method Details
-
assertAlive
Check that a server is alive by probing theHttpServer.isAlive()
method and the text of its toString() description- Parameters:
server
- server
-
assertNotLive
-
testCreatedServerIsNotAlive
Test that the server is alive once started- Throws:
Throwable
- on failure
-
testStopUnstartedServer
- Throws:
Throwable
-
testStartedServerIsAlive
Test that the server is alive once started- Throws:
Throwable
- on failure
-
assertToStringContains
Assert that the result ofHttpServer.toString()
contains the specific text- Parameters:
server
- server to examinetext
- text to search for
-
testStoppedServerIsNotAlive
Test that the server is not alive once stopped- Throws:
Throwable
- on failure
-
testStoppingTwiceServerIsAllowed
Test that the server is not alive once stopped- Throws:
Throwable
- on failure
-
testWepAppContextAfterServerStop
Test that the server is alive once started- Throws:
Throwable
-