planet.test
Class SimpleTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byplanet.test.SimpleTest
All Implemented Interfaces:
junit.framework.Test

public class SimpleTest
extends junit.framework.TestCase

Test differents simulation cases, with joining, failing and leaving nodes.

Author:
Ruben Mondejar , Jordi Pujol

Constructor Summary
SimpleTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
 void test1000Join()
          Builds a network with 1000 nodes, based with events file "test_join1000r.txt".
 void test1000NetworkJoin()
          Builds a network with 1000 nodes, with the predefined node class at properties file, using network.joinNodes(1000).
 void testBuild100()
          Test to build dynamically 100 nodes with the predefined node class at properties file.
 void testFail()
          Joins 4 nodes and one fail, based with events file "test_fail.txt".
 void testFixFingers()
          Tests if all finger tables contains correct values, based with events file "test_join.txt".
 void testJoin()
          Join 4 nodes, with events at file "test_join.txt".
 void testLeave()
          Joins 4 nodes, and one leave, based with events file "test_leave.txt".
 void testStabilize()
          Tests the stabilization process of 4 nodes, based with events file "test_join.txt".
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, run, run, runBare, runTest, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleTest

public SimpleTest(java.lang.String name)
           throws InitializationException
Method Detail

setUp

protected void setUp()

suite

public static junit.framework.Test suite()

testJoin

public void testJoin()
              throws java.lang.Exception
Join 4 nodes, with events at file "test_join.txt".

Throws:
java.lang.Exception

testLeave

public void testLeave()
               throws java.lang.Exception
Joins 4 nodes, and one leave, based with events file "test_leave.txt".

Throws:
java.lang.Exception

testFail

public void testFail()
              throws java.lang.Exception
Joins 4 nodes and one fail, based with events file "test_fail.txt".

Throws:
java.lang.Exception

testStabilize

public void testStabilize()
                   throws java.lang.Exception
Tests the stabilization process of 4 nodes, based with events file "test_join.txt".

Throws:
java.lang.Exception

testFixFingers

public void testFixFingers()
                    throws java.lang.Exception
Tests if all finger tables contains correct values, based with events file "test_join.txt".

Throws:
java.lang.Exception

testBuild100

public void testBuild100()
                  throws java.lang.Exception
Test to build dynamically 100 nodes with the predefined node class at properties file. It shows for each iteration the node just builded using GenericFactory.buildNode().

Throws:
java.lang.Exception

test1000NetworkJoin

public void test1000NetworkJoin()
                         throws java.lang.Exception
Builds a network with 1000 nodes, with the predefined node class at properties file, using network.joinNodes(1000).

Throws:
java.lang.Exception

test1000Join

public void test1000Join()
                  throws java.lang.Exception
Builds a network with 1000 nodes, based with events file "test_join1000r.txt".

Throws:
java.lang.Exception