libstore: make baseRetryTimeMs a FileTransfer property

we don't even need this outside of tests. maybe we should not do
automatic retries at this level at all and use retrying wrappers
instead? at some point we may have to do this, but not just yet.

Change-Id: If0088aa55215be81f1770c25b3bb1b5268c65cf8
This commit is contained in:
eldritch horrors
2024-10-26 21:42:35 +00:00
parent 1e3b45546c
commit af27d1ecd8
3 changed files with 13 additions and 14 deletions
+2 -4
View File
@@ -178,9 +178,8 @@ TEST(FileTransfer, NOT_ON_DARWIN(defersFailures))
// might only do so once its internal buffer has already been filled.)
return std::string(1024 * 1024, ' ');
});
auto ft = makeFileTransfer();
auto ft = makeFileTransfer(0);
FileTransferRequest req(fmt("http://[::1]:%d/index", port));
req.baseRetryTimeMs = 0;
auto src = ft->download(std::move(req));
ASSERT_THROW(src->drain(), FileTransferError);
}
@@ -216,9 +215,8 @@ TEST(FileTransfer, usesIntermediateLinkHeaders)
[] { return ""; }},
{"200 ok", "content-length: 1\r\n", [] { return "a"; }},
});
auto ft = makeFileTransfer();
auto ft = makeFileTransfer(0);
FileTransferRequest req(fmt("http://[::1]:%d/first", port));
req.baseRetryTimeMs = 0;
auto result = ft->enqueueDownload(req).get();
ASSERT_EQ(result.immutableUrl, "http://foo");
}