Skip to content

Commit

Permalink
Adjust timeouts in Validator Site tests:
Browse files Browse the repository at this point in the history
* Prevents spurious failures due to DNS resolution.
  • Loading branch information
ximinez authored and manojsdoshi committed Apr 24, 2020
1 parent bd8dbb8 commit 3bf0b72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/test/app/ValidatorSite_test.cpp
Expand Up @@ -202,7 +202,10 @@ class ValidatorSite_test : public beast::unit_test::suite
trustedKeys.load(emptyLocalKey, emptyCfgKeys, cfgPublishers));

using namespace std::chrono_literals;
auto sites = std::make_unique<ValidatorSite>(env.app(), journal, 2s);
// Normally, tests will only need a fraction of this time,
// but sometimes DNS resolution takes an inordinate amount
// of time, so the test will just wait.
auto sites = std::make_unique<ValidatorSite>(env.app(), journal, 12s);

std::vector<std::string> uris;
for (auto const& u : servers)
Expand Down Expand Up @@ -453,7 +456,7 @@ class ValidatorSite_test : public beast::unit_test::suite
true,
true}});
// timeout
testFetchList({{"/sleep/3", "took too long", ssl, true, true}});
testFetchList({{"/sleep/13", "took too long", ssl, true, true}});
// bad manifest version
testFetchList(
{{"/validators", "Unsupported version", ssl, false, true, 4}});
Expand Down

0 comments on commit 3bf0b72

Please sign in to comment.