Skip to content

Commit

Permalink
Disable flaky ChanRipperTest
Browse files Browse the repository at this point in the history
  • Loading branch information
metaprime committed Jan 7, 2025
1 parent 79951c4 commit a21303f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,22 @@ public void testChanStringParsing() throws IOException, URISyntaxException {
}

@Test
// Test fails when desuarchive is down. See comment on getRandomThreadDesuarchive.
@Tag("flaky")
public void testChanRipper() throws IOException, URISyntaxException {
List<URL> contentURLs = new ArrayList<>();
contentURLs.add(getRandomThreadDesuarchive());
for (URL url : contentURLs) {
if (url == null) {
Assertions.fail("Could not get a random thread from desuarchive");
}
ChanRipper ripper = new ChanRipper(url);
testChanRipper(ripper);
}
}

// This method can return null if desuarchive is down.
// At time of writing we experienced a 504 Gateway Timeout.
public URL getRandomThreadDesuarchive() throws URISyntaxException {
try {
Document doc = Http.url(new URI("https://desuarchive.org/wsg/").toURL()).get();
Expand All @@ -73,5 +80,4 @@ public URL getRandomThreadDesuarchive() throws URISyntaxException {
}
return null;
}

}

0 comments on commit a21303f

Please sign in to comment.