public class TestNSSHealthCheck extends TestCase2
TestCase2.MyProperties, TestCase2.RandomType| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.jetty.client.HttpClient |
m_client
The http client.
|
protected org.eclipse.jetty.server.Server |
m_fixture |
protected String |
m_namespace |
protected RemoteRepositoryManager |
m_repo
The client-API wrapper to the NSS.
|
protected String |
m_rootURL
The URL of the root of the web application server.
|
protected String |
m_serviceURL
The effective
NanoSparqlServer http end point (including the
ContextPath). |
_randomType, log| Constructor and Description |
|---|
TestNSSHealthCheck(String name) |
| Modifier and Type | Method and Description |
|---|---|
Properties |
getProperties() |
static void |
main(String[] args)
Connect to the NSS end point and run a test suite designed to verify the
health of that instance.
|
protected org.eclipse.jetty.server.Server |
newFixture() |
protected void |
setUp()
Setup a random namespace for each test.
|
protected void |
tearDown() |
void |
test_webapp_structure_contextPath_html_indexHtml()
The fully qualified URL for
index.html |
void |
test_webapp_structure_contextPath_indexHtml()
URL with context path and index.html reference
|
void |
test_webapp_structure_contextPath()
URL with correct context path
|
void |
test_webapp_structure_counters()
The
/counters servlet responds. |
void |
test_webapp_structure_favicon()
The
favicon.ico file. |
void |
test_webapp_structure_rootURL()
bare URL of the server
|
void |
test_webapp_structure_status()
The
/status servlet responds. |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logPropertiesassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected org.eclipse.jetty.client.HttpClient m_client
protected RemoteRepositoryManager m_repo
protected String m_serviceURL
NanoSparqlServer http end point (including the
ContextPath).
http://localhost:9999/bigdata -- webapp URL (includes "/bigdata" context path.
protected String m_rootURL
http://localhost:9999 -- root URL
protected org.eclipse.jetty.server.Server m_fixture
protected String m_namespace
public TestNSSHealthCheck(String name)
protected void setUp()
throws Exception
protected void tearDown()
throws Exception
protected org.eclipse.jetty.server.Server newFixture()
throws Exception
Exceptionpublic Properties getProperties()
getProperties in class TestCase2public void test_webapp_structure_rootURL()
throws Exception
http://localhost:9999The response is should be
index.html since we want the
bigdata webapp to respond for the top-level context.
Note: You must ensure that the client follows redirects using a standard policy. This is necessary for tests of the webapp structure since the container may respond with a redirect (302) to the location of the webapp when the client requests the root URL.
Exceptionpublic void test_webapp_structure_contextPath()
throws Exception
http://localhost:9999/bigdataThe response is should be
index.html, which is specified
through the welcome files list.Exceptionpublic void test_webapp_structure_contextPath_indexHtml()
throws Exception
http://localhost:9999/bigdata/index.htmlThis URL does NOT get mapped to anything (404).
Exceptionpublic void test_webapp_structure_favicon()
throws Exception
favicon.ico file.Exceptionpublic void test_webapp_structure_status()
throws Exception
/status servlet responds.Exceptionpublic void test_webapp_structure_counters()
throws Exception
/counters servlet responds.Exceptionpublic void test_webapp_structure_contextPath_html_indexHtml()
throws Exception
index.html
http://localhost:9999/bigdata/html/index.htmlThe response is should be
index.html, which is specified
through the welcome files list.Exceptionpublic static void main(String[] args) throws MalformedURLException
args - URLMalformedURLException - TODO Support HA health checks as well.Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.