forked from I2P_Developers/i2p.i2p
Tests: Fix broken OutboundTest
never worked - didn't check result, processed own config
This commit is contained in:
@@ -9,6 +9,7 @@ package net.i2p.router.tunnel;
|
||||
*/
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.router.RouterContext;
|
||||
@@ -38,13 +39,14 @@ public class OutboundTest extends TestCase{
|
||||
OutboundGatewayProcessor p = new OutboundGatewayProcessor(_context, config);
|
||||
p.process(message, 0, message.length);
|
||||
|
||||
for (int i = 0; i < numHops; i++) {
|
||||
for (int i = 1; i < numHops; i++) {
|
||||
HopProcessor hop = new HopProcessor(_context, config.getConfig(i));
|
||||
Hash prev = config.getConfig(i).getReceiveFrom();
|
||||
assertTrue(hop.process(message, 0, message.length, prev));
|
||||
}
|
||||
|
||||
boolean eq = DataHelper.eq(orig, 16, message, 16, orig.length - 16);
|
||||
assertTrue(eq);
|
||||
}
|
||||
|
||||
private TunnelCreatorConfig prepareConfig(int numHops) {
|
||||
|
||||
Reference in New Issue
Block a user