Changeset e708149


Ignore:
Timestamp:
Jan 23, 2016 5:58:16 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
374996d
Parents:
594abde
Message:

Fix unit tests I broke

Location:
router/java
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/tunnel/HopProcessor.java

    r594abde re708149  
    3131    //static final boolean USE_DOUBLE_IV_ENCRYPTION = true;
    3232    static final int IV_LENGTH = 16;
     33
     34    /**
     35     *  @deprecated used only by unit tests
     36     */
     37    HopProcessor(I2PAppContext ctx, HopConfig config) {
     38        this(ctx, config, createValidator());
     39    }
    3340   
    34 
    3541    public HopProcessor(I2PAppContext ctx, HopConfig config, IVValidator validator) {
    3642        _context = ctx;
     
    3844        _config = config;
    3945        _validator = validator;
     46    }
     47
     48    /**
     49     *  @deprecated used only by unit test constructor
     50     */
     51    private static IVValidator createValidator() {
     52        // yeah, we'll use an O(1) validator later (e.g. bloom filter)
     53        return new HashSetIVValidator();
    4054    }
    4155   
  • router/java/src/net/i2p/router/tunnel/InboundEndpointProcessor.java

    r594abde re708149  
    2222    //static final boolean USE_ENCRYPTION = HopProcessor.USE_ENCRYPTION;
    2323   
    24     /** @deprecated unused */
    25     public InboundEndpointProcessor(RouterContext ctx, TunnelCreatorConfig cfg) {
     24    /**
     25     *  @deprecated used only by unit tests
     26     */
     27    InboundEndpointProcessor(RouterContext ctx, TunnelCreatorConfig cfg) {
    2628        this(ctx, cfg, DummyValidator.getInstance());
    2729    }
  • router/java/test/junit/net/i2p/router/tunnel/BuildMessageTestStandalone.java

    r594abde re708149  
    7676            // this not only decrypts the current hop's record, but encrypts the other records
    7777            // with the reply key
    78             BuildRequestRecord req = proc.decrypt(ctx, msg, _peers[i], _privKeys[i]);
     78            BuildRequestRecord req = proc.decrypt(msg, _peers[i], _privKeys[i]);
    7979            // If false, no records matched the _peers[i], or the decryption failed
    8080            assertTrue("foo @ " + i, req != null);
Note: See TracChangeset for help on using the changeset viewer.