diff options
Diffstat (limited to 'config/src/tests')
6 files changed, 11 insertions, 5 deletions
diff --git a/config/src/tests/configfetcher/configfetcher.cpp b/config/src/tests/configfetcher/configfetcher.cpp index 02d90352f69..eab2e8a8c84 100644 --- a/config/src/tests/configfetcher/configfetcher.cpp +++ b/config/src/tests/configfetcher/configfetcher.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/config/helper/configfetcher.h> +#include <vespa/vespalib/util/exception.h> #include <fstream> #include "config-my.h" #include <atomic> @@ -151,7 +152,7 @@ TEST_F("verify that config generation can be obtained from config fetcher", Conf if (cb._configured) { break; } - FastOS_Thread::Sleep(10); + std::this_thread::sleep_for(std::chrono::milliseconds(10));; } EXPECT_EQUAL(2, fetcher.getGeneration()); EXPECT_EQUAL("bar", cb._config.get()->myField); diff --git a/config/src/tests/configparser/configparser.cpp b/config/src/tests/configparser/configparser.cpp index 40c0a5b99bd..f9e36a11def 100644 --- a/config/src/tests/configparser/configparser.cpp +++ b/config/src/tests/configparser/configparser.cpp @@ -2,6 +2,7 @@ #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/config/config.h> #include <vespa/config/common/configparser.h> +#include <vespa/config/common/exceptions.h> #include "config-foo.h" #include <fstream> #include <vespa/vespalib/stllike/asciistream.h> diff --git a/config/src/tests/configretriever/configretriever.cpp b/config/src/tests/configretriever/configretriever.cpp index 8273eee2c73..8e2d38e3c4d 100644 --- a/config/src/tests/configretriever/configretriever.cpp +++ b/config/src/tests/configretriever/configretriever.cpp @@ -9,6 +9,7 @@ #include <vespa/config/retriever/simpleconfigurer.h> #include <vespa/config/common/configholder.h> #include <vespa/config/subscription/configsubscription.h> +#include <vespa/config/common/exceptions.h> #include "config-bootstrap.h" #include "config-foo.h" #include "config-bar.h" diff --git a/config/src/tests/file_subscription/file_subscription.cpp b/config/src/tests/file_subscription/file_subscription.cpp index 622610ac1b5..25d27bcf905 100644 --- a/config/src/tests/file_subscription/file_subscription.cpp +++ b/config/src/tests/file_subscription/file_subscription.cpp @@ -3,6 +3,7 @@ #include <vespa/config/config.h> #include <vespa/config/common/configholder.h> #include <vespa/config/file/filesource.h> +#include <vespa/config/common/exceptions.h> #include <vespa/vespalib/util/sync.h> #include <fstream> #include <config-my.h> diff --git a/config/src/tests/functiontest/functiontest.cpp b/config/src/tests/functiontest/functiontest.cpp index 28b688c189e..34429ab4016 100644 --- a/config/src/tests/functiontest/functiontest.cpp +++ b/config/src/tests/functiontest/functiontest.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/config/config.h> +#include <vespa/config/common/exceptions.h> #include "config-function-test.h" #include <fstream> diff --git a/config/src/tests/subscriber/subscriber.cpp b/config/src/tests/subscriber/subscriber.cpp index 3bae5ed85b1..ce9a8fcbb6a 100644 --- a/config/src/tests/subscriber/subscriber.cpp +++ b/config/src/tests/subscriber/subscriber.cpp @@ -4,6 +4,7 @@ #include <vespa/config/common/misc.h> #include <vespa/config/common/configholder.h> #include <vespa/config/subscription/configsubscription.h> +#include <vespa/config/common/exceptions.h> #include <fstream> #include "config-foo.h" #include "config-bar.h" @@ -281,9 +282,9 @@ TEST_MT_FFF("requireThatConfigIsReturnedWhenUpdatedDuringNextConfig", 2, MyManag verifyConfig("foo2", f3.h1->getConfig()); verifyConfig("bar", f3.h2->getConfig()); } else { - FastOS_Thread::Sleep(300); + std::this_thread::sleep_for(std::chrono::milliseconds(300)); f1.updateValue(0, createFooValue("foo2"), 2); - FastOS_Thread::Sleep(300); + std::this_thread::sleep_for(std::chrono::milliseconds(300)); f1.updateGeneration(1, 2); } } @@ -331,7 +332,7 @@ TEST_MT_FFF("requireThatNextConfigIsInterruptedOnClose", 2, MyManager, APIFixtur ASSERT_TRUE(timer.MilliSecsToNow() >= 500.0); ASSERT_TRUE(timer.MilliSecsToNow() < 60000.0); } else { - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); f3.s.close(); } } @@ -514,7 +515,7 @@ TEST_MT_FF("requireThatConfigSubscriberWaitsUntilNextConfigSucceeds", 2, MyManag verifyConfig("foo2", h1->getConfig()); // First update is skipped } else { TEST_BARRIER(); - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); f1.updateValue(0, createFooValue("foo2"), 3); } } |