A base class for the old style of library tests. More...
Classes | |
class | GetServer |
class | GetThread |
class | PutServer |
class | PutThread |
Public Member Functions | |
void | genericGetPut (Thread putter, Thread getter) throws Throwable |
void | checkGetResults (ContentObject getResults) |
Subclassible object processing operations, to make it possible to easily implement tests based on this one. | |
void | checkPutResults (ContentName putResult) |
void | getResults (ContentName baseName, int count, CCNHandle handle) throws IOException, InvalidKeyException, SignatureException, InterruptedException |
Expects this method to call checkGetResults on each set of content returned. | |
void | doPuts (ContentName baseName, int count, CCNHandle handle) throws InterruptedException, SignatureException, MalformedContentNameStringException, IOException, InvalidKeyException |
Responsible for calling checkPutResults on each put. | |
int | getUniqueId () |
Static Public Member Functions | |
static void | setUpBeforeClass () throws Exception |
static void | tearDownAfterClass () throws Exception |
Static Public Attributes | |
static int | count = 55 |
static Random | rand = new Random() |
static final int | WAIT_DELAY = 200000 |
Protected Attributes | |
HashSet< Integer > | _resultSet = new HashSet<Integer>() |
Static Protected Attributes | |
static boolean | exit = false |
static Throwable | error = null |
static final String | BASE_NAME = "/test/BaseLibraryTest/" |
static ContentName | PARENT_NAME |
static final boolean | DO_TAP = true |
static ArrayList< Integer > | usedIds = new ArrayList<Integer>() |
Static Package Functions | |
[static initializer] |
A base class for the old style of library tests.
Defines a few common parameters, and a test-running framework which passes data between different threads or objects, via ccnd. New tests should probably not use this without some additional cleanup.
void org.ccnx.ccn.test.LibraryTestBase.checkGetResults | ( | ContentObject | getResults | ) |
Subclassible object processing operations, to make it possible to easily implement tests based on this one.
void org.ccnx.ccn.test.LibraryTestBase.doPuts | ( | ContentName | baseName, | |
int | count, | |||
CCNHandle | handle | |||
) | throws InterruptedException, SignatureException, MalformedContentNameStringException, IOException, InvalidKeyException |
Responsible for calling checkPutResults on each put.
(Could return them all in a batch then check...)
InterruptedException | ||
IOException | ||
MalformedContentNameStringException | ||
SignatureException | ||
InvalidKeyException |
Reimplemented in org.ccnx.ccn.test.BlockReadWriteTest, and org.ccnx.ccn.test.io.StreamTest.
void org.ccnx.ccn.test.LibraryTestBase.getResults | ( | ContentName | baseName, | |
int | count, | |||
CCNHandle | handle | |||
) | throws IOException, InvalidKeyException, SignatureException, InterruptedException |
Expects this method to call checkGetResults on each set of content returned.
..
baseName | ||
count | ||
handle |
InterruptedException | ||
IOException | ||
SignatureException | ||
InvalidKeyException | ||
InterruptedException |
Reimplemented in org.ccnx.ccn.test.BlockReadWriteTest, and org.ccnx.ccn.test.io.StreamTest.