Changeset 1cf544f


Ignore:
Timestamp:
Jun 18, 2015 12:41:58 AM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
acc6478
Parents:
0f4e095
Message:

fix unit test compile

Location:
router/java/test/junit/net/i2p/router/client
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/test/junit/net/i2p/router/client/LocalClientConnectionRunner.java

    r0f4e095 r1cf544f  
    4343     */
    4444    @Override
    45     void requestLeaseSet(LeaseSet set, long expirationTime, Job onCreateJob, Job onFailedJob) {
     45    void requestLeaseSet(Hash h, LeaseSet set, long expirationTime, Job onCreateJob, Job onFailedJob) {
    4646        RequestVariableLeaseSetMessage msg = new RequestVariableLeaseSetMessage();
    47         msg.setSessionId(getSessionId());
     47        msg.setSessionId(getSessionId(h));
    4848        for (int i = 0; i < set.getLeaseCount(); i++) {
    4949            Lease lease = set.getLease(i);
     
    6161     */
    6262    @Override
    63     void updateMessageDeliveryStatus(MessageId id, long messageNonce, int status) {
     63    void updateMessageDeliveryStatus(Destination dest, MessageId id, long messageNonce, int status) {
    6464        if (messageNonce <= 0)
    6565            return;
    6666        MessageStatusMessage msg = new MessageStatusMessage();
    6767        msg.setMessageId(id.getMessageId());
    68         msg.setSessionId(getSessionId().getSessionId());
     68        msg.setSessionId(getSessionId(dest.calculateHash()).getSessionId());
    6969        // has to be >= 0, it is initialized to -1
    7070        msg.setNonce(messageNonce);
  • router/java/test/junit/net/i2p/router/client/LocalClientManager.java

    r0f4e095 r1cf544f  
    5959            runner.receiveMessage(toDest, fromDest, payload);
    6060            if (sender != null)
    61                 sender.updateMessageDeliveryStatus(msgId, messageNonce, MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL);
     61                sender.updateMessageDeliveryStatus(fromDest, msgId, messageNonce, MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL);
    6262        } else {
    6363            // remote.  ignore.
    6464            System.out.println("Message " + msgId + " is targeting a REMOTE destination - DROPPED");
    6565            if (sender != null)
    66                 sender.updateMessageDeliveryStatus(msgId, messageNonce, MessageStatusMessage.STATUS_SEND_GUARANTEED_FAILURE);
     66                sender.updateMessageDeliveryStatus(fromDest, msgId, messageNonce, MessageStatusMessage.STATUS_SEND_GUARANTEED_FAILURE);
    6767        }
    6868    }
  • router/java/test/junit/net/i2p/router/client/LocalClientMessageEventListener.java

    r0f4e095 r1cf544f  
    2626import net.i2p.data.i2cp.HostReplyMessage;
    2727import net.i2p.data.i2cp.I2CPMessageException;
     28import net.i2p.data.i2cp.SessionConfig;
    2829import net.i2p.data.i2cp.SessionId;
    2930import net.i2p.router.RouterContext;
     
    4445     */
    4546    @Override
    46     protected void startCreateSessionJob() {
     47    protected void startCreateSessionJob(SessionConfig config) {
    4748        long exp = _context.clock().now() + 10*60*1000;
    4849        LeaseSet ls = new LeaseSet();
     
    5455        lease.setEndDate(date);
    5556        ls.addLease(lease);
    56         _runner.requestLeaseSet(ls, exp, null, null);
     57        _runner.requestLeaseSet(config.getDestination().calculateHash(), ls, exp, null, null);
    5758    }
    5859
Note: See TracChangeset for help on using the changeset viewer.