tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 31 forks source link

flaky test: router/map-reduce #384

Closed Gerold103 closed 1 year ago

Gerold103 commented 1 year ago
router/map-reduce.test.lua                                      [ fail ]

Test failed! Result content mismatch:
--- router/map-reduce.result    Wed Nov 23 08:58:11 2022
+++ /home/runner/work/vshard/vshard/test/var/rejects/router/map-reduce.reject   Wed Nov 23 09:02:15 2022
@@ -186,6 +186,7 @@
  | ...
 ok, err = vshard.router.map_callrw('echo', {1}, timeout_opts)
  | ---
+ | - error: '/home/runner/work/vshard/vshard/vshard/router/init.lua:820: Usage: future:wait_result(timeout)'
  | ...
 assert(not ok and util.is_timeout_error(err))
  | ---
@@ -203,7 +204,7 @@
  | ...
 test_run:wait_cond(function() return lref.count == 0 end)
  | ---
- | - true
+ | - false
  | ...

Here is the reason: https://github.com/tarantool/tarantool/issues/7970.

Nonetheless we can't just let it be fixed in core. We have to support older versions. The proposal is to add a new vshard.util functions for waiting on the futures safely. Similar to vshard.util.fiber_cond_wait() but it will be vshard.util.future_wait(). Should be used instead of all :wait_result() places in vshard.