@@ -188,14 +188,18 @@ def bucket_is_not_empty(bucket_name):
188
188
189
189
# Step 7
190
190
if not self .wait_for (
191
- lambda : get_rows_in_portion (bucket2_path ) == self .row_count and bucket_is_not_empty (self .bucket2 )
192
- # TODO: Uncomment after fix https://github.com/ydb-platform/ydb/issues/13616
193
- # and not bucket_is_not_empty(self.bucket1)
194
- ,
191
+ lambda : get_rows_in_portion (bucket2_path ) == self .row_count and bucket_is_not_empty (self .bucket2 ),
195
192
plain_or_under_sanitizer (600 , 1200 ),
196
193
):
197
194
raise Exception ("Data eviction has not been started" )
198
195
196
+ # Wait until bucket1 is empty
197
+ if not self .wait_for (
198
+ lambda : not bucket_is_not_empty (self .bucket1 ),
199
+ plain_or_under_sanitizer (120 , 240 ), # TODO: change wait time use config "PeriodicWakeupActivationPeriod"
200
+ ):
201
+ raise Exception ("Bucket1 is not empty" )
202
+
199
203
# Step 8
200
204
t0 = time .time ()
201
205
stmt = f"""
@@ -210,10 +214,14 @@ def bucket_is_not_empty(bucket_name):
210
214
211
215
# Step 9
212
216
if not self .wait_for (
213
- lambda : get_rows_in_portion ("__DEFAULT" ) == self .row_count
214
- # TODO: Uncomment after fix https://github.com/ydb-platform/ydb/issues/13616
215
- # and not bucket_is_not_empty(self.bucket1) and not bucket_is_not_empty(self.bucket2)
216
- ,
217
+ lambda : get_rows_in_portion ("__DEFAULT" ) == self .row_count ,
217
218
plain_or_under_sanitizer (600 , 1200 ),
218
219
):
219
220
raise Exception ("Data eviction has not been started" )
221
+
222
+ # Wait until buckets are empty
223
+ if not self .wait_for (
224
+ lambda : not bucket_is_not_empty (self .bucket1 ) and not bucket_is_not_empty (self .bucket2 ),
225
+ plain_or_under_sanitizer (120 , 240 ), # TODO: change wait time use config "PeriodicWakeupActivationPeriod"
226
+ ):
227
+ raise Exception ("Buckets are not empty" )
0 commit comments