|
|||||||||
| 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.BackCompatTest
public final class BackCompatTest
Simple tests of backward compatibility. This tests for things that we explicitly want to keep compatible, or alternatively do not expect nor want to needlessly break.
This is also used for testing the handling of accession data, since that is stuff that we need to be able to handle for a long time.
| Field Summary | |
|---|---|
private static boolean |
CALC_COMPRESSION_STATS
If true, print out some compression stats to help with tuning. |
static java.util.List<java.lang.String> |
frozenAEPs
Immutable set of usable (GZIPed) serialised AEP files in date order. |
static java.util.List<java.lang.String> |
frozenEVVSs
Immutable set of usable (GZIPed) serialised event-history files in approximate date order. |
static java.util.List<java.lang.String> |
JIB_SER_GZ_FILES
Historical GZIPped serialised JIndexBean instances, newest last, for checking backward compatibility. |
private static java.util.Random |
rnd
Private source of OK pseudo-random numbers. |
static java.lang.String |
testDataDir
Test data directory (project-relative) not ending in '/' for frozen AEP and test/event data; not null. |
| Constructor Summary | |
|---|---|
BackCompatTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
static java.util.Map<CompressionLevel,byte[]> |
showCompression(byte[] raw,
java.io.PrintStream out)
Give some indication of compression available in supplied raw data. |
static void |
testAccessionHashes()
Test generation of hashes for AccessionData. |
static void |
testAEPDeserialise()
Check that we can deserialise older snapshots of our exhibit data. |
static void |
testAEPDiffs()
Check that we can compute diffs between AEPs successfully. |
static void |
testEVVSDeserialise()
Check that we can deserialise older snapshots of our EventVariableValueSet data. |
static void |
testEVVSHistoryLoad()
Test history load. |
static void |
testJIBLegacyDeser()
Test that deserialisation of old JIB frozen instances is still possible. |
| 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 static final boolean CALC_COMPRESSION_STATS
public static final java.lang.String testDataDir
public static final java.util.List<java.lang.String> frozenAEPs
These are AllExhibitProperties objects.
The last entry is the most recent (and usually the largest).
public static final java.util.List<java.lang.String> frozenEVVSs
These are EventVariableValueSet objects.
The last entry is the most recent and/or largest and thus a good performance benchmark for algorithm/representation tweaks.
public static final java.util.List<java.lang.String> JIB_SER_GZ_FILES
private static final java.util.Random rnd
| Constructor Detail |
|---|
public BackCompatTest(java.lang.String name)
| Method Detail |
|---|
public static void testAEPDeserialise()
throws java.lang.Exception
We take advantage of multiple CPUs to load these in parallel, which should be safe.
java.lang.Exception
public static void testEVVSDeserialise()
throws java.lang.Exception
java.lang.Exception
public static void testEVVSHistoryLoad()
throws java.lang.Exception
java.lang.Exception
public static java.util.Map<CompressionLevel,byte[]> showCompression(byte[] raw,
java.io.PrintStream out)
The input data is not altered, and is returned in the result under the "NONE" tag.
Note that not all compression levels may be implemented/tested, eg due to resource constraints.
public static void testAccessionHashes()
throws java.lang.Exception
java.lang.Exception
public static final void testAEPDiffs()
throws java.lang.Exception
It is acceptable for the diff routine to refuse to create a diff/delta for whatever reason (unless the force flag is true).
java.lang.Exception
public static void testJIBLegacyDeser()
throws java.lang.Exception
java.lang.Exception
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||