Package i5.las2peer.testing
Class TestSuite
java.lang.Object
i5.las2peer.testing.TestSuite
This class provides methods for developers to simplify JUnit test creation.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PastryNodeImpl
addNode
(int bootstrapPort, SharedStorage.STORAGE_MODE storageMode, Long nodeIdSeed) static ArrayList<PastryNodeImpl>
launchNetwork
(int numOfNodes) This method starts a network consisting of the given number of nodes.static ArrayList<PastryNodeImpl>
launchNetwork
(int numOfNodes, SharedStorage.STORAGE_MODE storageMode, boolean wipeData) This method starts a network consisting of the given number of nodes.static void
self teststatic void
-
Field Details
-
TEST_STORAGE_DIR
- See Also:
-
-
Constructor Details
-
TestSuite
public TestSuite()
-
-
Method Details
-
launchNetwork
This method starts a network consisting of the given number of nodes. The nodes should be used for testing only, because they are listening only on the loopback address and their ports are choosen by the operating system. Furthermore this method uses a non persistent storage mode for each node.- Parameters:
numOfNodes
- The number of nodes that should be in the network.- Returns:
- Returns a list with all nodes from the network.
- Throws:
Exception
- If an error occurs.
-
wipeTestStorage
- Throws:
IOException
-
main
self test- Parameters:
args
- ignored
-