forked from I2P_Developers/i2p.i2p
Rename BuildMessageTest so it doesn't match the JUnit wildcard.
Add note that the test (most likely) needs to be re-written fom scratch.
This commit is contained in:
@ -23,8 +23,16 @@ import net.i2p.util.Log;
|
|||||||
* Simple test to create an encrypted TunnelBuildMessage, decrypt its layers (as it would be
|
* Simple test to create an encrypted TunnelBuildMessage, decrypt its layers (as it would be
|
||||||
* during transmission), inject replies, then handle the TunnelBuildReplyMessage (unwrapping
|
* during transmission), inject replies, then handle the TunnelBuildReplyMessage (unwrapping
|
||||||
* the reply encryption and reading the replies).
|
* the reply encryption and reading the replies).
|
||||||
|
*
|
||||||
|
* ===
|
||||||
|
* Update 1/5/2013 :
|
||||||
|
* This test is renamed so it does not match the JUnit wildcard.
|
||||||
|
* There is something wrong with the decryption check; it doesn't look like the test takes
|
||||||
|
* into consideration the re-encryption of the records in the TunnelBuildMessage.
|
||||||
|
* Most probably the test will have to be re-written from scratch.
|
||||||
|
* --zab
|
||||||
*/
|
*/
|
||||||
public class BuildMessageTest extends TestCase {
|
public class BuildMessageTestStandalone extends TestCase {
|
||||||
private Hash _peers[];
|
private Hash _peers[];
|
||||||
private PrivateKey _privKeys[];
|
private PrivateKey _privKeys[];
|
||||||
private PublicKey _pubKeys[];
|
private PublicKey _pubKeys[];
|
||||||
@ -35,7 +43,7 @@ public class BuildMessageTest extends TestCase {
|
|||||||
I2PAppContext ctx = I2PAppContext.getGlobalContext();
|
I2PAppContext ctx = I2PAppContext.getGlobalContext();
|
||||||
Log log = ctx.logManager().getLog(getClass());
|
Log log = ctx.logManager().getLog(getClass());
|
||||||
|
|
||||||
List order = pickOrder(ctx);
|
List<Integer> order = pickOrder();
|
||||||
|
|
||||||
TunnelCreatorConfig cfg = createConfig(ctx);
|
TunnelCreatorConfig cfg = createConfig(ctx);
|
||||||
_replyRouter = new Hash();
|
_replyRouter = new Hash();
|
||||||
@ -122,9 +130,9 @@ public class BuildMessageTest extends TestCase {
|
|||||||
"\n================================================================");
|
"\n================================================================");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List pickOrder(I2PAppContext ctx) {
|
private static final List<Integer> pickOrder() {
|
||||||
// pseudorandom, yet consistent (so we can be repeatable)
|
// pseudorandom, yet consistent (so we can be repeatable)
|
||||||
List rv = new ArrayList(8);
|
List<Integer> rv = new ArrayList<Integer>(8);
|
||||||
rv.add(new Integer(2));
|
rv.add(new Integer(2));
|
||||||
rv.add(new Integer(4));
|
rv.add(new Integer(4));
|
||||||
rv.add(new Integer(6));
|
rv.add(new Integer(6));
|
Reference in New Issue
Block a user