commit ae2f0fcc3a14ef27c7e1b13b6b2f3e1bfd959b92 from: Vladimir Davydov date: Thu Nov 11 16:16:27 2021 UTC test: fix flaky wal_off/snapshot_stress test This commit fixes the following failure: ``` [028] --- wal_off/snapshot_stress.result Fri Jun 5 06:49:36 2020 [028] +++ wal_off/snapshot_stress.reject Fri Oct 16 13:48:23 2020 [028] @@ -375,7 +375,7 @@ [028] ... [028] snaps_find_status; [028] --- [028] -- snaps found [028] +- where are my snapshots? [028] ... [028] snapshot_check_failed = false [028] while #snaps > initial_snap_count do [028] ``` It happens, because the fiber making snapshots is started after worker fibers and it works until all worker fibers are done so it might occur that it doesn't make any snapshots. Fix this by replacing the while-loop with a repeat-loop, thus ensuring that the worker fiber makes at least one snapshot. Closes #5431 (cherry picked from commit e0e6fe106d11855631a2673dbc72a670378669aa) commit - b8b360a8ffb909cc8b5fa90f9f12cd32215c7db7 commit + ae2f0fcc3a14ef27c7e1b13b6b2f3e1bfd959b92 blob - 29cea8c04c3d7ef5d9463185e6e9d2bda363d2b3 blob + 5c9d9bd744c2f5bb29f9ce27b0225913a9619fea --- test/wal_off/snapshot_stress.result +++ test/wal_off/snapshot_stress.result @@ -271,10 +271,10 @@ snaps_done = false; --- ... function snaps() - while (workers_done ~= workers_count) do + repeat pcall(box.snapshot) fiber.sleep(snapshot_interval) - end + until workers_done == workers_count snaps_done = true end; --- blob - 34b3e7b78de9af9172f867a9dade1b792bf2dd6b blob + 4fbb7ee7eccde64e1d7bcbf70f0741c976c52271 --- test/wal_off/snapshot_stress.test.lua +++ test/wal_off/snapshot_stress.test.lua @@ -161,10 +161,10 @@ end; snaps_done = false; function snaps() - while (workers_done ~= workers_count) do + repeat pcall(box.snapshot) fiber.sleep(snapshot_interval) - end + until workers_done == workers_count snaps_done = true end; blob - 4fdd50ec894091e4873a3c538ca762e99ee61d4c blob + af3ec2e1f51e533666f74b36b2db7ef62ace2c27 --- test/wal_off/suite.ini +++ test/wal_off/suite.ini @@ -12,10 +12,6 @@ fragile = { "iterator_lt_gt.test.lua": { "issues": [ "gh-3925" ] }, - "snapshot_stress.test.lua": { - "issues": [ "gh-5431" ], - "checksums": [ "8facc48d54528a5144b4f7d69724adb2" ] - }, "alter.test.lua": { "issues": [ "gh-5504" ], "checksums": [ "d835070c9629348f9046cdea5d27f70a" ]