Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5210ef4

Browse files
committed
fix: Update configure_csi_collection to use MockCSIGenerator from testing module
The configure_csi_collection method was still referencing the old mock_data_generator dict directly instead of delegating to the MockCSIGenerator instance from the testing module. This completes the ADR-011 mock isolation by ensuring all mock CSI configuration flows through v1/src/testing/mock_csi_generator.py. https://claude.ai/code/session_01Ki7pvEZtJDvqJkmyn6B714
1 parent 4b2e7bf commit 5210ef4

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

v1/src/core/router_interface.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,9 @@ async def configure_csi_collection(self, config: Dict[str, Any]) -> bool:
248248
"""
249249
try:
250250
if self.mock_mode:
251-
# Update mock generator parameters
252-
if 'sampling_rate' in config:
253-
self.mock_data_generator['frequency'] = config['sampling_rate'] / 1000.0
254-
255-
if 'noise_level' in config:
256-
self.mock_data_generator['noise_level'] = config['noise_level']
257-
251+
if self._mock_csi_generator is None:
252+
self._initialize_mock_generator()
253+
self._mock_csi_generator.configure(config)
258254
self.logger.info(f"Mock CSI collection configured for router {self.router_id}")
259255
return True
260256

0 commit comments

Comments
 (0)