commit
77997ca14b
@ -1,3 +1,3 @@
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk7
|
||||
- openjdk7
|
||||
|
@ -0,0 +1,26 @@
|
||||
package us.codecraft.webmagic.downloader;
|
||||
|
||||
import org.junit.Test;
|
||||
import us.codecraft.webmagic.Page;
|
||||
import us.codecraft.webmagic.Request;
|
||||
import us.codecraft.webmagic.Site;
|
||||
import us.codecraft.webmagic.Task;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* @author code4crafter@gmail.com
|
||||
* Date: 2017/11/29
|
||||
* Time: 下午1:32
|
||||
*/
|
||||
public class SSLCompatibilityTest {
|
||||
|
||||
@Test
|
||||
public void test_tls12() throws Exception {
|
||||
HttpClientDownloader httpClientDownloader = new HttpClientDownloader();
|
||||
Task task = Site.me().setCycleRetryTimes(5).toTask();
|
||||
Request request = new Request("https://juejin.im/");
|
||||
Page page = httpClientDownloader.download(request, task);
|
||||
assertThat(page.isDownloadSuccess()).isTrue();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue