diff options
author | d-mokhnatkin <[email protected]> | 2022-07-29 21:35:22 +0300 |
---|---|---|
committer | d-mokhnatkin <[email protected]> | 2022-07-29 21:35:22 +0300 |
commit | c01921d09751e9b57718c9425ed6f2c1094a3d74 (patch) | |
tree | ebeb92b69154a817dc63feedb0f09f72b0541cb5 | |
parent | 002a9e8a0143ca3bca5d1614bc8cd3f5ac300935 (diff) |
Temporary remove ut again
-rw-r--r-- | CMakeLists.darwin.txt | 1 | ||||
-rw-r--r-- | CMakeLists.linux.txt | 1 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp | 83 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/actors/ut/CMakeLists.darwin.txt | 45 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/actors/ut/CMakeLists.linux.txt | 49 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/actors/ut/CMakeLists.txt | 13 |
6 files changed, 0 insertions, 192 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt index 7db6f7bc5ff..0082d277f7b 100644 --- a/CMakeLists.darwin.txt +++ b/CMakeLists.darwin.txt @@ -1381,7 +1381,6 @@ add_subdirectory(ydb/public/sdk/cpp/examples/ttl) add_subdirectory(ydb/library/yql/providers/common/codec/ut) add_subdirectory(ydb/library/yql/providers/common/http_gateway/mock) add_subdirectory(ydb/library/yql/providers/common/structured_token/ut) -add_subdirectory(ydb/library/yql/providers/dq/actors/ut) add_subdirectory(ydb/library/yql/providers/pq/gateway/dummy) add_subdirectory(ydb/library/yql/providers/s3/path_generator/ut) add_subdirectory(ydb/library/yql/providers/s3/range_helpers/ut) diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt index 424df9cecda..8ddb245c0ee 100644 --- a/CMakeLists.linux.txt +++ b/CMakeLists.linux.txt @@ -1402,7 +1402,6 @@ add_subdirectory(ydb/public/sdk/cpp/examples/ttl) add_subdirectory(ydb/library/yql/providers/common/codec/ut) add_subdirectory(ydb/library/yql/providers/common/http_gateway/mock) add_subdirectory(ydb/library/yql/providers/common/structured_token/ut) -add_subdirectory(ydb/library/yql/providers/dq/actors/ut) add_subdirectory(ydb/library/yql/providers/pq/gateway/dummy) add_subdirectory(ydb/library/yql/providers/s3/path_generator/ut) add_subdirectory(ydb/library/yql/providers/s3/range_helpers/ut) diff --git a/ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp b/ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp deleted file mode 100644 index dc148c5e100..00000000000 --- a/ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include <ydb/library/yql/providers/dq/actors/grouped_issues.h> - -#include <library/cpp/testing/unittest/registar.h> -#include <library/cpp/time_provider/time_provider.h> - - -namespace NYq { - -using namespace NYql; - -struct AgileTimeProvider: ITimeProvider { - AgileTimeProvider(ui64 secs): Value(TInstant::Seconds(secs)) { - } - - void IncreaseTime(ui64 secs_to_add) { - Value = TInstant::Seconds(Value.Seconds() + secs_to_add); - } - - TInstant Now() { - return Value; - } - - TInstant Value = Now(); -}; - -TIntrusivePtr<AgileTimeProvider> CreateAgileTimeProvider(ui64 initial) { - return TIntrusivePtr<AgileTimeProvider>(new AgileTimeProvider(initial)); -} - -Y_UNIT_TEST_SUITE(TestIssuesGrouping) { - Y_UNIT_TEST(ShouldCountEveryIssue) { - int iterations = 4; - int issueTypes = 4; - int expectedNumberOfIssues[issueTypes]; - - for (int i = 0; i < iterations; ++i) { - NDq::GroupedIssues holder(CreateDefaultTimeProvider()); - for (int j = 0; j < issueTypes; ++j) { - expectedNumberOfIssues[j] = rand() % 100; - for (int k = 0; k < expectedNumberOfIssues[j]; ++k) { - holder.AddIssue(TIssue(ToString(j))); - } - } - UNIT_ASSERT(holder.Issues.size() == 4); - for (int j = 0; j < issueTypes; ++j) { - int encounters = holder.Issues[TIssue(ToString(j))].EncountersNumber; - UNIT_ASSERT_C(encounters == expectedNumberOfIssues[j], - "expected " << expectedNumberOfIssues[j] << " got " << encounters << " at index " << j << " at iteration " << i); - } - } - } - - Y_UNIT_TEST(ShouldRemoveOldIssues) { - TIntrusivePtr<AgileTimeProvider> timeProvider = CreateAgileTimeProvider(1); - NDq::GroupedIssues holder(timeProvider); - holder.IssueExpiration = TDuration::Seconds(5); - holder.AddIssue(TIssue("a")); - timeProvider->IncreaseTime(10); - holder.AddIssue(TIssue("b")); - UNIT_ASSERT_C(holder.Issues.size() < 2, "old issue is not removed"); - } - - Y_UNIT_TEST(ShouldRemoveIfMoreThanMaxIssues) { - NDq::GroupedIssues holder(CreateDefaultTimeProvider()); - for (int i = 0; i < 30; ++i) { - holder.AddIssue(TIssue(ToString(i))); - } - UNIT_ASSERT_C(holder.Issues.size() <= holder.MaxIssues, "overflow issues are not removed"); - } - - Y_UNIT_TEST(ShouldRemoveTheOldestIfMoreThanMaxIssues) { - TIntrusivePtr<AgileTimeProvider> timeProvider = CreateAgileTimeProvider(1); - NDq::GroupedIssues holder(timeProvider); - auto eldery = TIssue("there is a simple honor in poverty"); - holder.AddIssue(eldery); - timeProvider->IncreaseTime(1); - for (int i = 0; i < 20; ++i) { - holder.AddIssue(TIssue(ToString(i))); - } - UNIT_ASSERT_C(!holder.Issues.contains(eldery), "the oldest issue is not removed"); - } -} -} // namespace NYq diff --git a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.darwin.txt b/ydb/library/yql/providers/dq/actors/ut/CMakeLists.darwin.txt deleted file mode 100644 index 4d56ee25406..00000000000 --- a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.darwin.txt +++ /dev/null @@ -1,45 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_executable(ydb-library-yql-providers-dq-actors-ut) -target_include_directories(ydb-library-yql-providers-dq-actors-ut PRIVATE - ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/actors -) -target_link_libraries(ydb-library-yql-providers-dq-actors-ut PUBLIC - contrib-libs-cxxsupp - yutil - library-cpp-cpuid_check - cpp-testing-unittest_main - providers-dq-actors - cpp-testing-unittest - library-cpp-time_provider -) -target_link_options(ydb-library-yql-providers-dq-actors-ut PRIVATE - -Wl,-no_deduplicate - -Wl,-sdk_version,10.15 - -fPIC - -fPIC - -framework - CoreFoundation -) -target_sources(ydb-library-yql-providers-dq-actors-ut PRIVATE - ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp -) -add_test( - NAME - ydb-library-yql-providers-dq-actors-ut - COMMAND - ydb-library-yql-providers-dq-actors-ut - --print-before-suite - --print-before-test - --fork-tests - --print-times - --show-fails -) -vcs_info(ydb-library-yql-providers-dq-actors-ut) diff --git a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.linux.txt b/ydb/library/yql/providers/dq/actors/ut/CMakeLists.linux.txt deleted file mode 100644 index b8d6e74b66b..00000000000 --- a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.linux.txt +++ /dev/null @@ -1,49 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_executable(ydb-library-yql-providers-dq-actors-ut) -target_include_directories(ydb-library-yql-providers-dq-actors-ut PRIVATE - ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/actors -) -target_link_libraries(ydb-library-yql-providers-dq-actors-ut PUBLIC - contrib-libs-cxxsupp - yutil - cpp-malloc-tcmalloc - libs-tcmalloc-no_percpu_cache - library-cpp-cpuid_check - cpp-testing-unittest_main - providers-dq-actors - cpp-testing-unittest - library-cpp-time_provider -) -target_link_options(ydb-library-yql-providers-dq-actors-ut PRIVATE - -ldl - -lrt - -Wl,--no-as-needed - -fPIC - -fPIC - -lpthread - -lrt - -ldl -) -target_sources(ydb-library-yql-providers-dq-actors-ut PRIVATE - ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/actors/grouped_issues_ut.cpp -) -add_test( - NAME - ydb-library-yql-providers-dq-actors-ut - COMMAND - ydb-library-yql-providers-dq-actors-ut - --print-before-suite - --print-before-test - --fork-tests - --print-times - --show-fails -) -vcs_info(ydb-library-yql-providers-dq-actors-ut) diff --git a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.txt b/ydb/library/yql/providers/dq/actors/ut/CMakeLists.txt deleted file mode 100644 index fc7b1ee73ce..00000000000 --- a/ydb/library/yql/providers/dq/actors/ut/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - -if (APPLE) - include(CMakeLists.darwin.txt) -elseif (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() |