fix: Update testNonExistingUrl to testNonExistingHtmlResource, use not exist classpath resource

Signed-off-by: gongzhongqiang <gongzhongqiang@apache.org>
This commit is contained in:
gongzhongqiang
2025-03-18 20:30:36 +08:00
committed by Ilayaperumal Gopinathan
parent 4c0813dfb3
commit f167fd8b3c

View File

@@ -177,8 +177,8 @@ class JsoupDocumentReaderTests {
}
@Test
void testNonExistingUrl() {
JsoupDocumentReader reader = new JsoupDocumentReader("https://nonexistingurl.com",
void testNonExistingHtmlResource() {
JsoupDocumentReader reader = new JsoupDocumentReader("classpath:/non-existing.html",
JsoupDocumentReaderConfig.builder().build());
assertThatThrownBy(reader::get).isInstanceOf(RuntimeException.class);
}