[core] fix up online file source test so it compiles on android
This commit is contained in:
committed by
Ivo van Dongen
parent
3deade2dcd
commit
d2c9750b6d
@@ -149,7 +149,7 @@ TEST(OnlineFileSource, TEST_REQUIRES_SERVER(RetryDelayOnExpiredTile)) {
|
||||
std::unique_ptr<AsyncRequest> req = fs.request(resource, [&](Response res) {
|
||||
counter++;
|
||||
EXPECT_EQ(nullptr, res.error);
|
||||
EXPECT_GT(util::now(), res.expires);
|
||||
EXPECT_GT(util::now(), *res.expires);
|
||||
});
|
||||
|
||||
util::Timer timer;
|
||||
@@ -173,14 +173,14 @@ TEST(OnlineFileSource, TEST_REQUIRES_SERVER(RetryOnClockSkew)) {
|
||||
switch (counter++) {
|
||||
case 0: {
|
||||
EXPECT_EQ(nullptr, res.error);
|
||||
EXPECT_GT(util::now(), res.expires);
|
||||
EXPECT_GT(util::now(), *res.expires);
|
||||
} break;
|
||||
case 1: {
|
||||
EXPECT_EQ(nullptr, res.error);
|
||||
|
||||
auto now = util::now();
|
||||
EXPECT_LT(now + Seconds(40), res.expires) << "Expiration not interpolated to 60s";
|
||||
EXPECT_GT(now + Seconds(80), res.expires) << "Expiration not interpolated to 60s";
|
||||
EXPECT_LT(now + Seconds(40), *res.expires) << "Expiration not interpolated to 60s";
|
||||
EXPECT_GT(now + Seconds(80), *res.expires) << "Expiration not interpolated to 60s";
|
||||
|
||||
loop.stop();
|
||||
} break;
|
||||
@@ -413,4 +413,4 @@ TEST(OnlineFileSource, ChangeAPIBaseURL){
|
||||
const std::string customURL = "test.domain";
|
||||
fs.setAPIBaseURL(customURL);
|
||||
EXPECT_EQ(customURL, fs.getAPIBaseURL());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user