MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_get_timeout_caching

Method test_get_timeout_caching

tests/config/test_runtime.py:74–84  ·  view source on GitHub ↗

Test that timeout values are cached.

(self, base_config)

Source from the content-addressed store, hash-verified

72 assert timeout == 60.0
73
74 def test_get_timeout_caching(self, base_config):
75 """Test that timeout values are cached."""
76 rc = RuntimeConfig(base_config)
77
78 # First call
79 timeout1 = rc.get_timeout(TimeoutType.STREAMING_CHUNK)
80 # Second call should return cached value
81 timeout2 = rc.get_timeout(TimeoutType.STREAMING_CHUNK)
82
83 assert timeout1 == timeout2
84 assert TimeoutType.STREAMING_CHUNK in rc._timeout_cache
85
86 def test_get_timeout_from_env(self, base_config, monkeypatch):
87 """Test getting timeout from environment variable."""

Callers

nothing calls this directly

Calls 2

get_timeoutMethod · 0.95
RuntimeConfigClass · 0.90

Tested by

no test coverage detected