RestaurantRepositoryCacheService odd behaviour during debugging test

@Nabhan-CrioTA @Anmol-Crio_TA When I try to debug CacheServiceTest, the value of jedis seems to give “Cannot evaluate because of compilation error(s): jedis cannot be resolved to a variable.”.
Also, I am setting breakpoints at 3 lines, but the test program get paused only at 3rd breakpoint?
I have make a jedis database storing (key -> jsonstring of restaurants).

Hi there,
could be an issue due to workspace not loading all dependencies well. Please try the action suggested here

hii @initish2017
as nabhan suggested you can try reset your workspace, if it works then go ahead if it isn’t then
I have some questions in my mind.

  1. What are you expecting while asking for “jedis” in debug console?
  2. Seems like your 94 line statement is failing, which is findall() and also mocking restaurantrepository, where are you using this method with restaurantrepository.findAll()?
1 Like

Thanks for the hint. Actually, I was using mongoTemplate to fetch restaurants, but the test was using the restaurantrepository.findAll(). Hence, there was that issue in line 94.

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.