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()
Reads in the configuration properties for the test from a
variety of resources and returns a properties hierarchy.
|
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, logProperties
assertEquals, 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, toString
protected 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
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
protected org.eclipse.jetty.server.Server newFixture() throws Exception
Exception
public Properties getProperties()
TestCase2
Properties
object, then the lower levels of the
hierarchy are recursively searched.The hierarchy is constructed from the following properties files in the following order. The first property file in this list corresponds to the top of the property hierarchy. The last property file in this list corresponds to the bottom of the property hierarchy. The property resources are:
getProperties
in class TestCase2
Properties
object that supplies bindings for
property names according to the described hierarchy among
property resources. The returned Properties
is NOT
cached.
TODO This does not handle the recursive truncation of the
class name to search for "test.properties" yet.public 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.
Exception
public 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.Exception
public void test_webapp_structure_contextPath_indexHtml() throws Exception
http://localhost:9999/bigdata/index.htmlThis URL does NOT get mapped to anything (404).
Exception
public void test_webapp_structure_favicon() throws Exception
favicon.ico
file.Exception
public void test_webapp_structure_status() throws Exception
/status
servlet responds.Exception
public void test_webapp_structure_counters() throws Exception
/counters
servlet responds.Exception
public 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.Exception
public static void main(String[] args) throws MalformedURLException
args
- URLMalformedURLException
- TODO Support HA health checks as well.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.