1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-07 14:26:36 +02:00

Disable flaky ChanRipperTest

This commit is contained in:
MetaPrime
2025-01-06 21:13:14 -08:00
parent 79951c43e2
commit a21303f556

View File

@@ -55,15 +55,22 @@ public class ChanRipperTest extends RippersTest {
} }
@Test @Test
// Test fails when desuarchive is down. See comment on getRandomThreadDesuarchive.
@Tag("flaky")
public void testChanRipper() throws IOException, URISyntaxException { public void testChanRipper() throws IOException, URISyntaxException {
List<URL> contentURLs = new ArrayList<>(); List<URL> contentURLs = new ArrayList<>();
contentURLs.add(getRandomThreadDesuarchive()); contentURLs.add(getRandomThreadDesuarchive());
for (URL url : contentURLs) { for (URL url : contentURLs) {
if (url == null) {
Assertions.fail("Could not get a random thread from desuarchive");
}
ChanRipper ripper = new ChanRipper(url); ChanRipper ripper = new ChanRipper(url);
testChanRipper(ripper); 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 { public URL getRandomThreadDesuarchive() throws URISyntaxException {
try { try {
Document doc = Http.url(new URI("https://desuarchive.org/wsg/").toURL()).get(); Document doc = Http.url(new URI("https://desuarchive.org/wsg/").toURL()).get();
@@ -73,5 +80,4 @@ public class ChanRipperTest extends RippersTest {
} }
return null; return null;
} }
} }