Closed (fixed)
Project:
Monitoring
Version:
8.x-1.x-dev
Component:
Sensors
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2015 at 15:13 UTC
Updated:
1 Oct 2015 at 06:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
giancarlosotelo commentedAdding a try/catch would solve this problem.
Comment #4
miro_dietikerThe resultVerbose function should not throw an exception.
This situation needs to be caught internally inside the verbose processing. Also we can display a proper error message in such a case - not just verbose message markup.
Comment #5
berdirI'm actually OK with fixing it like this. We do it exactly the same for the actual sensor check too.
Comment #6
giancarlosotelo commentedWell I added test for this error creating a Database Sensor with invalids conditions and asserting that the sensor has no problems otherwise should fail.
Comment #7
LKS90 commentedWorks correctly, I'm just not sure about the test. It'd be nicer if it explicitly failed instead of just producing one exception. (You could do that with another try/catch() block where you call the runSensor() method)
Comment #8
miro_dietikerThe test is fine. It just needs to fail then.
Committed.
Comment #10
giancarlosotelo commentedCan this issue be related to #2528528: Test DatabaseAggregator sensor with invalid fields ?
We are testing DatabaseAggregator with wrong values. or it is more related to UI Test?
Comment #14
juanse254 commentedComment #18
giancarlosotelo commented