diff options
author | Ilnaz Nizametdinov <[email protected]> | 2022-04-01 14:41:07 +0300 |
---|---|---|
committer | Ilnaz Nizametdinov <[email protected]> | 2022-04-01 14:41:07 +0300 |
commit | e83869058f2e86e92c417ce5a418d002f601a324 (patch) | |
tree | 83d6808b2493442aede3f1664a85e73867f40de1 | |
parent | ce595f945b861180f6b229905dfd6e5f49fe19fe (diff) |
Additional negative scheme test KIKIMR-13698
ref:d5f2d264e7a56671736b157e2e3b6b075fd1d950
-rw-r--r-- | ydb/core/tx/schemeshard/ut_cdc_stream.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ydb/core/tx/schemeshard/ut_cdc_stream.cpp b/ydb/core/tx/schemeshard/ut_cdc_stream.cpp index 7bdbf5327fd..aedf7a458ec 100644 --- a/ydb/core/tx/schemeshard/ut_cdc_stream.cpp +++ b/ydb/core/tx/schemeshard/ut_cdc_stream.cpp @@ -60,6 +60,46 @@ Y_UNIT_TEST_SUITE(TCdcStreamTests) { TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/Table/Stream/streamImpl"), {NLs::PathNotExist}); } + Y_UNIT_TEST(Negative) { + TTestBasicRuntime runtime; + TTestEnv env(runtime, TTestEnvOptions().EnableProtoSourceIdInfo(true)); + ui64 txId = 100; + + TestCreateTable(runtime, ++txId, "/MyRoot", R"( + Name: "Table" + Columns { Name: "key" Type: "Uint64" } + Columns { Name: "value" Type: "Uint64" } + KeyColumnNames: ["key"] + )"); + env.TestWaitNotification(runtime, txId); + + TestCreateCdcStream(runtime, ++txId, "/MyRoot", R"( + TableName: "Table" + StreamDescription { + Name: "Stream" + Mode: ECdcStreamModeKeysOnly + Format: ECdcStreamFormatProto + } + )"); + env.TestWaitNotification(runtime, txId); + + TestMkDir(runtime, ++txId, "/MyRoot/Table/Stream", "Dir", {NKikimrScheme::StatusNameConflict}); + + TestCreateTable(runtime, ++txId, "/MyRoot/Table/Stream", R"( + Name: "Table" + Columns { Name: "key" Type: "Uint64" } + Columns { Name: "value" Type: "Uint64" } + KeyColumnNames: ["key"] + )", {NKikimrScheme::StatusNameConflict}); + + TestCreatePQGroup(runtime, ++txId, "/MyRoot/Table/Stream", R"( + Name: "streamImpl2" + TotalGroupCount: 1 + PartitionPerTablet: 1 + PQTabletConfig: { PartitionConfig { LifetimeSeconds: 3600 } } + )", {NKikimrScheme::StatusNameConflict}); + } + Y_UNIT_TEST(CreateStream) { TTestBasicRuntime runtime; TTestEnv env(runtime, TTestEnvOptions().EnableProtoSourceIdInfo(true)); |