aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnaury <snaury@ydb.tech>2023-07-03 10:59:57 +0300
committersnaury <snaury@ydb.tech>2023-07-03 10:59:57 +0300
commit6d589b99505f87df63cba108a7e02803161d4d8f (patch)
tree359bae54f3ae4ce1a7e95c3766b5dd39beee93f2
parentcdac138c4f0cf9a43b766ebefe9e548f87f16c45 (diff)
downloadydb-6d589b99505f87df63cba108a7e02803161d4d8f.tar.gz
Minimize runtime sleep after tablet reboots
-rw-r--r--ydb/core/testlib/tablet_helpers.cpp5
-rw-r--r--ydb/core/tx/schemeshard/ut_topic_splitmerge.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/ydb/core/testlib/tablet_helpers.cpp b/ydb/core/testlib/tablet_helpers.cpp
index 76e0aed50df..e01e5947b45 100644
--- a/ydb/core/testlib/tablet_helpers.cpp
+++ b/ydb/core/testlib/tablet_helpers.cpp
@@ -604,7 +604,8 @@ namespace NKikimr {
runtime.DispatchEvents(rebootOptions);
InvalidateTabletResolverCache(runtime, tabletId, nodeIndex);
- WaitScheduledEvents(runtime, TDuration::Seconds(1), sender, nodeIndex);
+ // FIXME: there's at least one nbs test that weirdly depends on this sleeping for at least ~50ms, unclear why
+ WaitScheduledEvents(runtime, TDuration::MilliSeconds(50), sender, nodeIndex);
}
void GracefulRestartTablet(TTestActorRuntime &runtime, ui64 tabletId, const TActorId &sender, ui32 nodeIndex) {
@@ -614,7 +615,7 @@ namespace NKikimr {
runtime.DispatchEvents(rebootOptions);
InvalidateTabletResolverCache(runtime, tabletId, nodeIndex);
- WaitScheduledEvents(runtime, TDuration::Seconds(1), sender, nodeIndex);
+ WaitScheduledEvents(runtime, TDuration::MilliSeconds(50), sender, nodeIndex);
}
void SetupTabletServices(TTestActorRuntime &runtime, TAppPrepare *app, bool mockDisk, NFake::TStorage storage,
diff --git a/ydb/core/tx/schemeshard/ut_topic_splitmerge.cpp b/ydb/core/tx/schemeshard/ut_topic_splitmerge.cpp
index d9f98f1f97e..c5e00ec4401 100644
--- a/ydb/core/tx/schemeshard/ut_topic_splitmerge.cpp
+++ b/ydb/core/tx/schemeshard/ut_topic_splitmerge.cpp
@@ -620,8 +620,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTopicSplitMergeTest) {
TestAllocatePQ(runtime, tenantSchemeShard, ++txId, "/MyRoot/USER_2", allocate.DebugString());
env.TestWaitNotification(runtime, txId);
- // It doesn't work without reboot. We need to figure out why.
- RebootTablet(runtime, tenantSchemeShard, runtime.AllocateEdgeActor());
+ // It doesn't work without sleep (previously reboot tablet was incidentally sleeping). We need to figure out why.
+ runtime.SimulateSleep(TDuration::Seconds(1));
Cerr << "Describe: " << Endl;
auto allocatedTopic = DescribeTopic(runtime, "/MyRoot/USER_2/Topic1", tenantSchemeShard);