fix near cache problematic tests.
Merge pull request #2109 from eminn/fix/nearcachetests

fix near cache problematic tests.