🧪 Improve test coverage for LMCacheConnectorV2 exception handling#82
🧪 Improve test coverage for LMCacheConnectorV2 exception handling#82SuarezPM wants to merge 4 commits into
Conversation
…, lookup, and close - Injects fault directly into `engine.retrieve()` to assert it returns `None` and increments the miss stat without crashing. - Adds test cases for exceptions raised inside `mask.any()`, `lookup()`, and `close()`. - Uses `_BrokenRetrieve`, `_BrokenMask`, `_BrokenLookup`, and `_BrokenClose` engines. Co-authored-by: SuarezPM <110942776+SuarezPM@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…, lookup, and close - Injects fault directly into `engine.retrieve()` to assert it returns `None` and increments the miss stat without crashing. - Adds test cases for exceptions raised inside `mask.any()`, `lookup()`, and `close()`. - Uses `_BrokenRetrieve`, `_BrokenMask`, `_BrokenLookup`, and `_BrokenClose` engines. Co-authored-by: SuarezPM <110942776+SuarezPM@users.noreply.github.com>
…, lookup, and close - Injects fault directly into `engine.retrieve()` to assert it returns `None` and increments the miss stat without crashing. - Adds test cases for exceptions raised inside `mask.any()`, `lookup()`, and `close()`. - Uses `_BrokenRetrieve`, `_BrokenMask`, `_BrokenLookup`, and `_BrokenClose` engines. Signed-off-by: Pablo <suarezpm@csnat.unt.edu.ar> Co-authored-by: SuarezPM <110942776+SuarezPM@users.noreply.github.com>
- Injects fault directly into engine.retrieve() to assert it returns None and increments the miss stat without crashing. - Adds test cases for exceptions raised inside mask.any(), lookup(), and close(). - Uses _BrokenRetrieve, _BrokenMask, _BrokenLookup, and _BrokenClose engines. Signed-off-by: Pablo <suarezpm@csnat.unt.edu.ar> Co-authored-by: SuarezPM <110942776+SuarezPM@users.noreply.github.com>
🎯 What: This PR addresses the untested exception handling in
LMCacheConnectorV2(specifically inapohara_context_forge/serving/lmcache_connector.py).📊 Coverage: The following scenarios are now covered with automated tests:
engine.retrieve()throwing an exception (returnsNone, bumps miss stat).mask.any()throwing an exception (treats it as a hit if mask exists, without crashing).engine.lookup()throwing an exception (returns0without crashing).engine.close()throwing an exception (is safely caught and continues).✨ Result: Test coverage in
apohara_context_forge/serving/lmcache_connector.pyhas been significantly improved by adding safety-net tests around previously untestedexcept Exception:blocks, allowing for confident and reliable execution of the fallback and error paths.PR created automatically by Jules for task 13039725683639478265 started by @SuarezPM