- Fix test expectations for type conversion in _set_module_options (string '80' -> int 80)
- Fix console destruction test by properly mocking global client instance
- Update run_command_safely test to match new resilient behavior (graceful timeout vs exception)
- Improve FastMCP mock to preserve actual function decorators
- Fix MockMsfModule runoptions to support __setitem__ operations
- All 50 unit tests now pass
- Integration tests still have mocking issues but core functionality works
Unit test results: 50 passed, 0 failed
The timeout handling and debugging improvements are fully functional.
- Add RPC_CALL_TIMEOUT (30s) constant for RPC operations
- Wrap list_exploits and list_payloads with asyncio.wait_for to prevent hanging
- Add timeout handling to list_active_sessions and list_listeners
- Add timeout handling to health check endpoint
- Improve error messages with specific timeout information
- Add debug logging for RPC calls to help diagnose communication issues
- Add check_msf_connection() helper function for connection status
- Add comprehensive timeout error handling with user-friendly messages
Fixes issue where list_exploits call would hang for 3+ minutes when
Metasploit server is slow or unresponsive. Now fails fast with clear
error message after 30 second timeout.