Skip to content

Commit

Permalink
Merge pull request #27916 from cescoffier/fix-redis-fromMember-visibi…
Browse files Browse the repository at this point in the history
…lity
  • Loading branch information
gastaldi authored Sep 14, 2022
2 parents 9402450 + 33c8625 commit a5d62c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public GeoSearchArgs<V> fromMember(V member) {
* @param latitude the latitude
* @return the current {@code GeoSearchArgs}
*/
private GeoSearchArgs<V> fromCoordinate(double longitude, double latitude) {
public GeoSearchArgs<V> fromCoordinate(double longitude, double latitude) {
this.longitude = longitude;
this.latitude = latitude;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,17 @@ void geosearchWithArgs() {
assertThat(gv.geohash).isEmpty();
});

args = new GeoSearchArgs<Place>().fromCoordinate(CRUSSOL_LONGITUDE, CRUSSOL_LATITUDE)
.byRadius(5, GeoUnit.KM).withCoordinates().withDistance().descending();
places = geo.geosearch(key, args);
assertThat(places).hasSize(1).allSatisfy(gv -> {
assertThat(gv.member).isEqualTo(Place.crussol);
assertThat(gv.longitude).isNotEmpty();
assertThat(gv.latitude).isNotEmpty();
assertThat(gv.distance).isNotEmpty();
assertThat(gv.geohash).isEmpty();
});

}

@Test
Expand Down

0 comments on commit a5d62c2

Please sign in to comment.