Skip to content

Commit

Permalink
Removed external URL test dependency
Browse files Browse the repository at this point in the history
Would cause test failures if no network was available during test execution. Since it was authored, the buffer variants that tripped the original bug have had better coverage added, no it is no longer required.

Fixes #1733
Closes #1754
  • Loading branch information
jhy committed May 23, 2022
1 parent bb7f93b commit 103d786
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/test/java/org/jsoup/integration/ConnectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -517,15 +517,12 @@ public void canFetchBinaryAsBytes() throws IOException {
@Test
public void handlesUnknownEscapesAcrossBuffer() throws IOException {
String localPath = "/htmltests/escapes-across-buffer.html";
String url =
"https://gist.githubusercontent.com/krystiangorecki/d3bad50ef5615f06b077438607423533/raw/71adfdf81121282ea936510ed6cfe440adeb2d83/JsoupIssue1218.html";
String localUrl = FileServlet.urlTo(localPath);

Document docFromGithub = Jsoup.connect(url).get(); // different chunks meant GH would error but local not...
Document docFromLocalServer = Jsoup.connect(localUrl).get();
Document docFromFileRead = Jsoup.parse(ParseTest.getFile(localPath), "UTF-8");

String text = docFromGithub.body().text();
String text = docFromLocalServer.body().text();
assertEquals(14766, text.length());
assertEquals(text, docFromLocalServer.body().text());
assertEquals(text, docFromFileRead.body().text());
Expand Down

0 comments on commit 103d786

Please sign in to comment.