configurable http client timeouts

This commit is contained in:
Athou
2024-08-16 21:12:54 +02:00
parent 1b1a3f49c1
commit 012ce71134
10 changed files with 118 additions and 73 deletions

View File

@@ -45,8 +45,8 @@ class FeedFetcherTest {
byte[] content = "content".getBytes();
String lastContentHash = Hashing.sha1().hashBytes(content).toString();
Mockito.when(getter.getBinary(url, lastModified, etag, 20000))
.thenReturn(new HttpResult(content, "content-type", "last-modified-2", "etag-2", 20, null));
Mockito.when(getter.getBinary(url, lastModified, etag))
.thenReturn(new HttpResult(content, "content-type", "last-modified-2", "etag-2", null));
NotModifiedException e = Assertions.assertThrows(NotModifiedException.class,
() -> fetcher.fetch(url, false, lastModified, etag, Instant.now(), lastContentHash));