|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
net.sf.zig_project.gpl.test.io.ThreadedXferTest
Simplistic test case for ThreadedTransfer
. Since we are testing a
multi-threaded class, the tests are designed to start simple, and grow
abusive in an attempt to force out intermittent thread communication
problems.
Each test will create a temporary file on the hard disk, containing random data. A ThreadedTransfer is spawned to duplicate that file to some set of mirrors. Then, all mirrors are tested for independantly for equality with the origional file.
Since all files are being stored in the same temporary space (usually a single hard disk) this class is purely a bug test, and a poor gauge for performance testing.
Method Summary | |
protected void |
setUp()
Creates all temp files. |
static TestSuite |
suite()
|
protected void |
tearDown()
Deletes temp files. |
void |
testBulkDuplication()
Tests ThreadedTransfer.write(byte[], int, int) |
void |
testByteDuplication()
Tests ThreadedTransfer.write(int) |
void |
testSlurpDuplication()
Tests ThreadedTransfer.slurp(InputStream) |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
protected void setUp() throws Exception
Exception
public void testSlurpDuplication() throws IOException
ThreadedTransfer.slurp(InputStream)
IOException
public void testBulkDuplication() throws IOException
ThreadedTransfer.write(byte[], int, int)
IOException
public void testByteDuplication() throws IOException
ThreadedTransfer.write(int)
IOException
protected void tearDown() throws Exception
Exception
public static TestSuite suite()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |