Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Oct 9, 2016
1 parent 3acfa74 commit 4dc89d5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/org/nutz/http/dns/HttpDNSTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.nutz.http.dns;

import static org.junit.Assert.*;

import org.junit.Test;
import org.nutz.http.Http;
import org.nutz.http.Response;
import org.nutz.http.dns.impl.AliDnsProvider;

public class HttpDNSTest {

@Test
public void testSetProvider() {

AliDnsProvider provider = new AliDnsProvider("100000");
HttpDNS.setProvider(provider);
assertNotNull(HttpDNS.getIp("www.aliyun.com"));

Response resp = Http.get("http://www.aliyun.com");
assertTrue(resp.isOK());
}

}

0 comments on commit 4dc89d5

Please sign in to comment.