org.ccnx.ccn.test.LibraryTestBase Class Reference

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

Inheritance diagram for org.ccnx.ccn.test.LibraryTestBase:

org.ccnx.ccn.test.CCNTestBase org.ccnx.ccn.test.BasePutGetTest org.ccnx.ccn.test.CCNLibraryTest org.ccnx.ccn.test.profiles.ccnd.FaceManagerTest org.ccnx.ccn.test.profiles.ccnd.InterestEndToEndUsingPrefixTest org.ccnx.ccn.test.profiles.ccnd.PrefixRegistrationManagerTest org.ccnx.ccn.test.protocol.InterestEndToEndTest org.ccnx.ccn.test.ReadTest org.ccnx.ccn.test.repo.RepoTestBase

List of all members.

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]

Classes

class  GetServer
class  GetThread
class  PutServer
class  PutThread


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

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 


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:08 2012 for Content-Centric Networking in Java by  doxygen 1.5.6