summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-07-03 19:38:31 +0200
committerantirez <antirez@gmail.com>2017-07-03 19:38:31 +0200
commitb2cd9fcab6122ccbf8b08f71f59a0af01931083b (patch)
tree4b361361dbbf250a003e08e3533df06ca4afa55b /tests
parent26e638a8e917608d8e75b07e5e941c7a24462c4d (diff)
downloadredis-b2cd9fcab6122ccbf8b08f71f59a0af01931083b.tar.gz
Fix GEORADIUS edge case with huge radius.
This commit closes issue #3698, at least for now, since the root cause was not fixed: the bounding box function, for huge radiuses, does not return a correct bounding box, there are points still within the radius that are left outside. So when using GEORADIUS queries with radiuses in the order of 5000 km or more, it was possible to see, at the edge of the area, certain points not correctly reported. Because the bounding box for now was used just as an optimization, and such huge radiuses are not common, for now the optimization is just switched off when the radius is near such magnitude. Three test cases found by the Continuous Integration test were added, so that we can easily trigger the bug again, both for regression testing and in order to properly fix it as some point in the future.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/geo.tcl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/geo.tcl b/tests/unit/geo.tcl
index fdbfbf139..604697be4 100644
--- a/tests/unit/geo.tcl
+++ b/tests/unit/geo.tcl
@@ -49,6 +49,9 @@ proc compare_lists {List1 List2} {
#
# The format is: seed km lon lat
set regression_vectors {
+ {1482225976969 7083 81.634948934258375 30.561509253718668}
+ {1482340074151 5416 -70.863281847379767 -46.347003465679947}
+ {1499014685896 6064 -89.818768962202014 -40.463868561416803}
{1412 156 149.29737817929004 15.95807862745508}
{441574 143 59.235461856813856 66.269555127373678}
{160645 187 -101.88575239939883 49.061997951502917}