org.ccnx.ccn.test.LibraryTestBase Class Reference

A base class for the old style of library tests. More...

List of all members.

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]

Detailed Description

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.


Member Function Documentation

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.

Author:
smetters
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...)

Exceptions:
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.

..

Parameters:
baseName 
count 
handle 
Returns:
Exceptions:
InterruptedException 
IOException 
SignatureException 
InvalidKeyException 
InterruptedException 

Reimplemented in org.ccnx.ccn.test.BlockReadWriteTest, and org.ccnx.ccn.test.io.StreamTest.


The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:51 2011 for Content-Centric Networking in Java by  doxygen 1.6.3