SIENTIAPDE-1478
Enhance end-to-end tests for PredictionsBatch workflow scenarios - Introduced mock repositories for PI Web API and OPC operations to improve test coverage. - Updated test scenarios to handle partial write errors for PI Web API and OPC. - Refactored existing tests to assert correct behavior under various error conditions. - Enhanced logging and error handling in API and OPC activities to provide clearer feedback on failures. - Removed outdated integration test file to streamline test suite.
This commit is contained in:
@@ -352,10 +352,13 @@ class OPC(SientiaMonitoring):
|
||||
This allows downstream systems to handle data quality appropriately.
|
||||
"""
|
||||
|
||||
message = 'Some data could not be written to OPC servers'
|
||||
|
||||
if not success:
|
||||
data['prediction_confidence'] = OPC_WRITTING_ERROR_CONFIDENCE
|
||||
data['comments'] = message
|
||||
self.debug(
|
||||
f'Some data could not be written to OPC servers, setting confidence to {OPC_WRITTING_ERROR_CONFIDENCE}.',
|
||||
f'{message}, setting confidence to {OPC_WRITTING_ERROR_CONFIDENCE}.',
|
||||
metadata,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user