-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flaky KqpOlapScheme.DropTable #6795
Conversation
@@ -6425,6 +6425,10 @@ Y_UNIT_TEST_SUITE(KqpOlapScheme) { | |||
} | |||
testHelper.DropTable("/Root/ColumnTableTest"); | |||
for (auto tablet: tabletIds) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а можешь как-то лаконичнее и переиспользуемее написать?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вынес ожидание в testHelper. я не нашёл других подходящих функций
⚪
|
⚪
|
@@ -130,6 +130,14 @@ namespace NKqp { | |||
} | |||
} | |||
|
|||
void TTestHelper::WaitTabletDeletionInHive(ui64 tabletId, TDuration duration) { | |||
auto deadline = TInstant::Now() + duration; | |||
while (GetKikimr().GetTestClient().TabletExistsInHive(&GetRuntime(), tabletId) && deadline >= TInstant::Now()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: на мой вкус было бы лучше ... && TInstant::Now() < deadline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
согласен, поправил
⚪
|
⚪
|
Messages TEvDeleteTablet and TEvRequestHiveInfo are sent from unit test to a hive throught different pipes, so they can be handled out of order. Because of that, a tablet may be recognised as alive shortly after DropTable is finished.