|
|||||||||
| 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.TunnelTest
public final class TunnelTest
Test the communications tunnel stand-alone (not relying on HTTP, etc).
| Field Summary | |
|---|---|
private SimpleLoggerIF |
logger
|
private static java.util.Random |
rnd
Private source of OK pseudo-random numbers. |
| Constructor Summary | |
|---|---|
TunnelTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
(package private) static void |
checkExhibitDataConsistency(SimpleExhibitPipelineIF stageA,
SimpleExhibitPipelineIF stageB,
boolean overTunnel,
long stopBy)
Check that exhibit properties and data from two points match. |
static void |
testAEPDiffTunnel()
Test getAEP 'diff' routine across the tunnel. |
static void |
testHMACEfficacy()
Test that our HMAC does detect corruption in, or tampering with, messages. |
static void |
testIntSerRoutines()
Test that our hand-crafted serialisation routines work. |
static void |
testRawPacketStreamSerialiseObject()
Test that stream-serialising compression works... |
static void |
testRawPacketWithOverlengthBuffer()
Test RawPacket using initial portion of over-length input buffer. |
void |
testTunnelGetRawData()
Tests basic transparency and behaviour of generic tunnel. |
void |
testTunnelNOOP()
Tests basic transparency and behaviour of generic tunnel. |
void |
testTunnelThumbnails()
Tests basic transparency and behaviour of generic tunnel. |
| 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 TunnelTest(java.lang.String name)
| Method Detail |
|---|
public void testTunnelNOOP()
throws java.lang.Exception
java.lang.Exception
public void testTunnelGetRawData()
throws java.lang.Exception
java.lang.Exception
public void testTunnelThumbnails()
throws java.lang.Exception
java.lang.Exception
public static void testIntSerRoutines()
throws java.lang.Exception
java.lang.Exceptionpublic static void testRawPacketWithOverlengthBuffer()
public static void testRawPacketStreamSerialiseObject()
throws java.lang.Exception
java.lang.Exception
static void checkExhibitDataConsistency(SimpleExhibitPipelineIF stageA,
SimpleExhibitPipelineIF stageB,
boolean overTunnel,
long stopBy)
throws java.io.IOException
Any cacheing stages are assumed to have been running long enough (usually at least one poll() if they are asynchronous) to have brought meta-data (eg properties) up-to-date.
Package-visible to be available to other test cases.
stageA - one sample stage in a pipeline
possibly on slave side of tunnel); never nullstageB - another sample stage in a pipeline in the same system;
never nulloverTunnel - if true, the two stages are on either side of
a tunnel and objects should have been serialised
between the sample stagesstopBy - a target time to stop by
when all distinct tests have been run at least once
java.io.IOException - in case of unexpected I/O problems
public static void testAEPDiffTunnel()
throws java.lang.Exception
java.lang.Exception
public static void testHMACEfficacy()
throws java.lang.Exception
Also, the timestamp and unique ID should prevent replay attacks (and should keep potential participants with bad clocks from communicating).
Note that whatever works on complete messages should also work on streamed messages, though there is an onus on the streaming-related code to behave safely even if fed bogus data.
java.lang.Exception
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||