Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shnikd committed Mar 21, 2024
1 parent ca65225 commit 022bd5a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
45 changes: 22 additions & 23 deletions ydb/core/tx/schemeshard/ut_sequence_reboots/ut_sequence_reboots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {
)");
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);

{
TInactiveZone inactive(activeZone);
// no inactive finalization
TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);
}
});
}
Expand Down Expand Up @@ -105,14 +103,20 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusAlreadyExists, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);
{
TInactiveZone inactive(activeZone);
TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);
}

t.TestEnv->ReliablePropose(runtime,
DropSequenceRequest(++t.TxId, "/MyRoot", "seq"),
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/seq", false, NLs::PathNotExist);
{
TInactiveZone inactive(activeZone);
TestLs(runtime, "/MyRoot/seq", false, NLs::PathNotExist);
}

t.TestEnv->ReliablePropose(runtime,
CreateSequenceRequest(++t.TxId, "/MyRoot", R"(
Expand All @@ -121,11 +125,9 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusAlreadyExists, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);

{
TInactiveZone inactive(activeZone);
// no inactive finalization
TestLs(runtime, "/MyRoot/seq", false, NLs::PathExist);
}
});
}
Expand Down Expand Up @@ -163,19 +165,23 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusAlreadyExists, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/Table/seq1", TDescribeOptionsBuilder().SetShowPrivateTable(true), NLs::PathExist);
TestLs(runtime, "/MyRoot/Table/seq2", TDescribeOptionsBuilder().SetShowPrivateTable(true), NLs::PathExist);
{
TInactiveZone inactive(activeZone);
TestLs(
runtime, "/MyRoot/Table/seq1", TDescribeOptionsBuilder().SetShowPrivateTable(true), NLs::PathExist);
TestLs(
runtime, "/MyRoot/Table/seq2", TDescribeOptionsBuilder().SetShowPrivateTable(true), NLs::PathExist);

}

t.TestEnv->ReliablePropose(runtime,
DropTableRequest(++t.TxId, "/MyRoot", "Table"),
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusPathDoesNotExist, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);

TestLs(runtime, "/MyRoot/Table", false, NLs::PathNotExist);

{
TInactiveZone inactive(activeZone);
// no inactive finalization
TestLs(runtime, "/MyRoot/Table", false, NLs::PathNotExist);
}
});
}
Expand All @@ -188,11 +194,7 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {

{
TInactiveZone inactive(activeZone);
// no inactive initialization
}

t.TestEnv->ReliablePropose(runtime,
CreateIndexedTableRequest(++t.TxId, "/MyRoot", R"(
TestCreateIndexedTable(runtime, ++t.TxId, "/MyRoot", R"(
TableDescription {
Name: "Table"
Columns { Name: "key" Type: "Uint64" DefaultFromSequence: "myseq" }
Expand All @@ -206,12 +208,9 @@ Y_UNIT_TEST_SUITE(TSequenceReboots) {
SequenceDescription {
Name: "myseq"
}
)"),
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusAlreadyExists, NKikimrScheme::StatusMultipleModifications});
t.TestEnv->TestWaitNotification(runtime, t.TxId);
)");
t.TestEnv->TestWaitNotification(runtime, t.TxId);

{
TInactiveZone inactive(activeZone);
i64 value = DoNextVal(runtime, "/MyRoot/Table/myseq");
UNIT_ASSERT_VALUES_EQUAL(value, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/schemeshard/ut_sequence_reboots/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IF (SANITIZER_TYPE == "thread" OR WITH_VALGRIND)
SIZE(LARGE)
TAG(ya:fat)
ELSE()
TIMEOUT(1200)
TIMEOUT(600)
SIZE(MEDIUM)
ENDIF()

Expand Down

0 comments on commit 022bd5a

Please sign in to comment.