diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fe40c3407e..12ee1b2411 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -53,6 +53,7 @@ jobs: shell: bash run: | ctest -j32 --preset release-unit + ctest --preset release-unit-mt integration: concurrency: diff --git a/CMakePresets.json b/CMakePresets.json index 7619864d8c..fdb3c81160 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -98,6 +98,23 @@ "filter" : { "include": { "label": "unit" + }, + "exclude": { + "label": "unit-multithreaded" + } + } + }, + { + "name": "release-unit-mt", + "inherits": "common", + "configurePreset": "release-test", + "displayName": "Unit Release Mutlithreaded Tests", + "execution": { + "jobs": 1 + }, + "filter" : { + "include": { + "label": "unit-multithreaded" } } }, diff --git a/library/cpp/threading/future/CMakeLists.txt b/library/cpp/threading/future/CMakeLists.txt index 0d4aca09b9..c794fd03db 100644 --- a/library/cpp/threading/future/CMakeLists.txt +++ b/library/cpp/threading/future/CMakeLists.txt @@ -1,10 +1,69 @@ +if (YDB_SDK_TESTS) + add_ydb_test(NAME threading-future-async_ut + SOURCES + async_ut.cpp + LINK_LIBRARIES + threading-future + cpp-testing-unittest_main + LABELS + unit + ) + + add_ydb_test(NAME threading-future-legacy_future_ut + SOURCES + legacy_future_ut.cpp + LINK_LIBRARIES + threading-future + cpp-testing-unittest_main + LABELS + unit + ) + + add_ydb_test(NAME threading-future-async_semaphore_ut + SOURCES + async_semaphore_ut.cpp + LINK_LIBRARIES + threading-future + cpp-testing-unittest_main + LABELS + unit + ) + + add_ydb_test(NAME threading-future-future_ut + SOURCES + future_ut.cpp + LINK_LIBRARIES + threading-future + cpp-testing-unittest_main + LABELS + unit + ) + + add_ydb_test(NAME threading-future-future_mt_ut + SOURCES + future_mt_ut.cpp + LINK_LIBRARIES + threading-future + cpp-testing-unittest_main + LABELS + unit-multithreaded + ) + set_yunittest_property( + TEST + threading-future-future_mt_ut + PROPERTY + TIMEOUT + 1500 + ) +endif(YDB_SDK_TESTS) + _ydb_sdk_add_library(threading-future) target_link_libraries(threading-future PUBLIC yutil ) -target_sources(threading-future +target_sources(threading-future PRIVATE async_semaphore.cpp async.cpp