diff options
author | Haavard <havardpe@yahoo-inc.com> | 2016-10-18 14:29:41 +0000 |
---|---|---|
committer | Haavard <havardpe@yahoo-inc.com> | 2016-10-18 14:29:41 +0000 |
commit | 560c734fc610963f3bf2de06a00ad5aaff5a6e0b (patch) | |
tree | e163066e525f3858459cac859f95fab5248bae9e /vespalib/src/tests/testkit-time_bomb | |
parent | 53070df56b5749185fbf549fc5b6b0b157bffe46 (diff) |
added TimeBomb - protects against deadlocked unit tests
Diffstat (limited to 'vespalib/src/tests/testkit-time_bomb')
-rw-r--r-- | vespalib/src/tests/testkit-time_bomb/CMakeLists.txt | 8 | ||||
-rw-r--r-- | vespalib/src/tests/testkit-time_bomb/testkit-time_bomb_test.cpp | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/vespalib/src/tests/testkit-time_bomb/CMakeLists.txt b/vespalib/src/tests/testkit-time_bomb/CMakeLists.txt new file mode 100644 index 00000000000..aa532f30913 --- /dev/null +++ b/vespalib/src/tests/testkit-time_bomb/CMakeLists.txt @@ -0,0 +1,8 @@ +# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +vespa_add_executable(vespalib_testkit-time_bomb_test_app TEST + SOURCES + testkit-time_bomb_test.cpp + DEPENDS + vespalib +) +vespa_add_test(NAME vespalib_testkit-time_bomb_test_app COMMAND vespalib_testkit-time_bomb_test_app) diff --git a/vespalib/src/tests/testkit-time_bomb/testkit-time_bomb_test.cpp b/vespalib/src/tests/testkit-time_bomb/testkit-time_bomb_test.cpp new file mode 100644 index 00000000000..8294df209cd --- /dev/null +++ b/vespalib/src/tests/testkit-time_bomb/testkit-time_bomb_test.cpp @@ -0,0 +1,9 @@ +// 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> + +TEST_MT_F("use time bomb in multi-threaded test", 4, vespalib::TimeBomb(60)) { + EXPECT_TRUE(true); +} + +TEST_MAIN() { TEST_RUN_ALL(); } |