tarantool / vshard

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

test: fix flaky router/map_reduce #392

Closed Serpentian closed 1 year ago

Serpentian commented 1 year ago

Currently map_reduce (or any other test related to the functions, in which loop over futures is used) can fail with the usage exception due to the fact, that negative values are not allowed in wait_result.

This commit introduces new util function, which is supposed to be used instead of wait_result. It throws box.error.TIMEOUT in case of a negative value as argument.

Note, that errors are inconsistent: the function may return either TimedOut error (which is one, returned from the original wait_result) or box.error.TIMEOUT.

Closes https://github.com/tarantool/vshard/issues/384

NO_DOC=bugfix

Serpentian commented 1 year ago

Everything is fixed