|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.hd.d.pg2k.test.dev.HTTPTunnelTest
public final class HTTPTunnelTest
Test the HTTP communications tunnel. May need to be running in a WAR container and in master mode for this to work (unless, exceptionally, the loopbackURL is pointing at another instance).
| Field Summary | |
|---|---|
private SimpleLoggerIF |
logger
|
private static java.util.Random |
rnd
Private source of OK pseudo-random numbers. |
| Constructor Summary | |
|---|---|
HTTPTunnelTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
static boolean |
canConnectToLoopbackURL()
Check that we can open a basic HTTP connection OK to the loopbackURL. |
static DataSourceBean |
getDataSourceBeanIfMaster()
If ServletContext exists and we are in master mode, return DataSource. |
void |
testAgainstDeadMaster()
Test behaviour against dead master. |
static void |
testHTTPLoopback()
Does basic loopback test. |
void |
testHTTPTunnelNOOP()
Attempts basic test of tunnel by doing a NO-OP (NOOP). |
static void |
testIntSerRoutines()
Test that our hand-crafted serialisation routines work. |
static void |
testRawPacketStreamSerialiseObject()
Test that stream-serialising compression works... |
void |
testTunnelBasic()
Attempts to test basic use of the tunnel for normal traffic. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
|---|
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, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final SimpleLoggerIF logger
private static final java.util.Random rnd
| Constructor Detail |
|---|
public HTTPTunnelTest(java.lang.String name)
| Method Detail |
|---|
public static void testIntSerRoutines()
throws java.lang.Exception
java.lang.Exception
public static void testRawPacketStreamSerialiseObject()
throws java.lang.Exception
java.lang.Exceptionpublic static boolean canConnectToLoopbackURL()
public static DataSourceBean getDataSourceBeanIfMaster()
Else we return null.
public static void testHTTPLoopback()
public void testHTTPTunnelNOOP()
throws java.lang.Exception
java.lang.Exception
public void testTunnelBasic()
throws java.lang.Exception
java.lang.Exception
public void testAgainstDeadMaster()
throws java.lang.Exception
We do not have to be master for this, nor even running as a servlet...
We simply check that we recover from a first dead connection, then subsequent connection attempts are refused for at least the minimum failure time and not much more than the maximum... These refusals should be with a "PGMasterNotInService" exception.
java.lang.Exception
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||