@@ -172,9 +172,7 @@ def rabbitmq_monitor():
172172
173173# Tests
174174
175- timeout = 60
176-
177-
175+ @pytest .mark .skip (reason = "Too flaky. Disable for now" )
178176def test_rabbitmq_restore_failed_connection_without_losses_1 (rabbitmq_cluster , rabbitmq_monitor ):
179177 """
180178 This test checks that after inserting through a RabbitMQ Engine, we can keep consuming from it
@@ -215,7 +213,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_1(rabbitmq_cluster, r
215213
216214 messages_num = 10000
217215 rabbitmq_monitor .set_expectations (published = messages_num , delivered = messages_num )
218- deadline = time .monotonic () + timeout
216+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
219217 while time .monotonic () < deadline :
220218 try :
221219 instance .query (
@@ -229,18 +227,18 @@ def test_rabbitmq_restore_failed_connection_without_losses_1(rabbitmq_cluster, r
229227 raise
230228 else :
231229 pytest .fail (
232- f"Time limit of { timeout } seconds reached. The query could not be executed successfully."
230+ f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The query could not be executed successfully."
233231 )
234232
235- deadline = time .monotonic () + timeout
233+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
236234 while time .monotonic () < deadline :
237235 number = int (instance .query ("SELECT count() FROM test.view" ))
238236 if number != 0 :
239237 logging .debug (f"{ number } /{ messages_num } before suspending RabbitMQ" )
240238 break
241239 time .sleep (0.1 )
242240 else :
243- pytest .fail (f"Time limit of { timeout } seconds reached. The count is still 0." )
241+ pytest .fail (f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The count is still 0." )
244242
245243 suspend_rabbitmq (rabbitmq_cluster , rabbitmq_monitor )
246244
@@ -251,7 +249,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_1(rabbitmq_cluster, r
251249
252250 resume_rabbitmq (rabbitmq_cluster , rabbitmq_monitor )
253251
254- deadline = time .monotonic () + timeout
252+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
255253 while time .monotonic () < deadline :
256254 result = instance .query ("SELECT count(DISTINCT key) FROM test.view" )
257255 if int (result ) == messages_num :
@@ -260,7 +258,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_1(rabbitmq_cluster, r
260258 time .sleep (1 )
261259 else :
262260 pytest .fail (
263- f"Time limit of { timeout } seconds reached. The result did not match the expected value."
261+ f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The result did not match the expected value."
264262 )
265263
266264 instance .query (
@@ -275,6 +273,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_1(rabbitmq_cluster, r
275273 )
276274
277275
276+ @pytest .mark .skip (reason = "Too flaky. Disable for now" )
278277def test_rabbitmq_restore_failed_connection_without_losses_2 (rabbitmq_cluster , rabbitmq_monitor ):
279278 """
280279 This test checks that after inserting through a RabbitMQ Engine, we can keep consuming from it
@@ -306,7 +305,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_2(rabbitmq_cluster, r
306305
307306 messages_num = 10000
308307 rabbitmq_monitor .set_expectations (published = messages_num , delivered = messages_num )
309- deadline = time .monotonic () + timeout
308+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
310309 while time .monotonic () < deadline :
311310 try :
312311 instance .query (
@@ -320,18 +319,18 @@ def test_rabbitmq_restore_failed_connection_without_losses_2(rabbitmq_cluster, r
320319 raise
321320 else :
322321 pytest .fail (
323- f"Time limit of { timeout } seconds reached. The query could not be executed successfully."
322+ f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The query could not be executed successfully."
324323 )
325324
326- deadline = time .monotonic () + timeout
325+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
327326 while time .monotonic () < deadline :
328327 number = int (instance .query ("SELECT count() FROM test.view" ))
329328 if number != 0 :
330329 logging .debug (f"{ number } /{ messages_num } before suspending RabbitMQ" )
331330 break
332331 time .sleep (0.1 )
333332 else :
334- pytest .fail (f"Time limit of { timeout } seconds reached. The count is still 0." )
333+ pytest .fail (f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The count is still 0." )
335334
336335 suspend_rabbitmq (rabbitmq_cluster , rabbitmq_monitor )
337336
@@ -348,7 +347,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_2(rabbitmq_cluster, r
348347 # kill_rabbitmq()
349348 # revive_rabbitmq()
350349
351- deadline = time .monotonic () + timeout
350+ deadline = time .monotonic () + DEFAULT_TIMEOUT_SEC
352351 while time .monotonic () < deadline :
353352 result = instance .query ("SELECT count(DISTINCT key) FROM test.view" ).strip ()
354353 if int (result ) == messages_num :
@@ -357,7 +356,7 @@ def test_rabbitmq_restore_failed_connection_without_losses_2(rabbitmq_cluster, r
357356 time .sleep (1 )
358357 else :
359358 pytest .fail (
360- f"Time limit of { timeout } seconds reached. The result did not match the expected value."
359+ f"Time limit of { DEFAULT_TIMEOUT_SEC } seconds reached. The result did not match the expected value."
361360 )
362361
363362 instance .query (
0 commit comments