optimizely / python-sdk

Python SDK for Optimizely Feature Experimentation and Optimizely Full Stack (legacy)
https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/python-sdk
Apache License 2.0
32 stars 36 forks source link

Mpirnovar update error #433

Closed Mat001 closed 8 months ago

Mat001 commented 8 months ago

Summary

Test plan

Issues

Mat001 commented 8 months ago

@andrewleap-optimizely (cc @pvcraven ) Any idea why with "self.assertRaises(OverflowError):" would not catch the Overflow error. But logs when Overflow exception occurs do show. It's all in the _run() function in config_manager().

I trigger Overflow error by passing a very large (overflowing) int to the update_interval for polling.

What confuses me is that the logs from that try block in the _run() funciton do show, but the Error is not raised. The assumption is that I mock the right thing.

Here I mock fetch_datafile get request that is inside PollingConfigManager:

project_config_manager = config_manager.PollingConfigManager(sdk_key=sdk_key, logger=mock_logger, update_interval=12345678912345)

However the error happens in the _run() function that is part of fetch_datafile(). Maybe error doesn't bubble up?