Adjust timeouts in Validator Site tests:

* Prevents spurious failures due to DNS resolution.
This commit is contained in:
Edward Hennis
2020-04-15 13:45:51 -04:00
committed by manojsdoshi
parent bd8dbb87b6
commit 3bf0b724a3

View File

@@ -202,7 +202,10 @@ private:
trustedKeys.load(emptyLocalKey, emptyCfgKeys, cfgPublishers)); trustedKeys.load(emptyLocalKey, emptyCfgKeys, cfgPublishers));
using namespace std::chrono_literals; 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; std::vector<std::string> uris;
for (auto const& u : servers) for (auto const& u : servers)
@@ -453,7 +456,7 @@ public:
true, true,
true}}); true}});
// timeout // timeout
testFetchList({{"/sleep/3", "took too long", ssl, true, true}}); testFetchList({{"/sleep/13", "took too long", ssl, true, true}});
// bad manifest version // bad manifest version
testFetchList( testFetchList(
{{"/validators", "Unsupported version", ssl, false, true, 4}}); {{"/validators", "Unsupported version", ssl, false, true, 4}});