Changeset bb38e07


Ignore:
Timestamp:
Dec 3, 2017 6:17:44 PM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
676e9c9
Parents:
5a3f016
Message:

Fix broken I2PSocketEepGet test, add additional case

Broken in 49d33fa03636041c4da35476539a3b6aa318da11 by the move from URL to URI.
If URI is passed a URL with a negative port, URI.getHost() returns null, which
bypasses the coercion-to-80. Zero, OTOH, is still coerced.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/test/junit/net/i2p/client/streaming/I2PSocketEepGetTest.java

    r5a3f016 rbb38e07  
    118118    @Test
    119119    public void testFetch_negPort() {
     120        // Fails, because URI is stricter than URL
     121        fetchFrom("http://" + STATS_HOST + ":-1", false);
     122    }
     123
     124    @Test
     125    public void testFetch_zeroPort() {
    120126        // Gets rewritten to 80
    121         fetchFrom("http://" + STATS_HOST + ":-1", true);
     127        fetchFrom("http://" + STATS_HOST + ":0", true);
    122128    }
    123129
Note: See TracChangeset for help on using the changeset viewer.