You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance the AbstractStrategy.validateConnectorDetectionCriteria method to collect a new StatusInformation parameter. This parameter will aggregate and append messages from CriterionTestResult instances found in the ConnectorTestResult.
/** * Builds the status information for the connector * @param hostname Hostname of the resource being monitored * @param testResult Test result of the connector * @return String representing the status information */protectedStringbuildStatusInformation(finalStringhostname, finalConnectorTestResulttestResult) {
finalStringBuildervalue = newStringBuilder();
finalStringbuiltTestResult = testResult
.getCriterionTestResults()
.stream()
.map(criterionResult -> {
finalStringresult = criterionResult.getResult();
finalStringmessage = criterionResult.getMessage();
returnString.format(
"Received Result: %s. %s",
result != null ? result : "N/A",
message != null ? message : "N/A"
);
})
.collect(Collectors.joining("\n"));
value
.append(builtTestResult)
.append("\nConclusion: ")
.append("Test on ")
.append(hostname)
.append(" ")
.append(testResult.isSuccess() ? "SUCCEEDED" : "FAILED");
returnvalue.toString();
}
Add the StatusInformation value in the legacyTextParameters of the Monitor typed as connector.
The text was updated successfully, but these errors were encountered:
* Update validateConnectorDetectionCriteria to put StatusInformation in the legacyTextParameters monitor attribute map of the connector monitor
* Add unit tests assertions in DiscoveryStrategyTest, SimpleStrategyTest and CollectStrategyTest
Specification
Enhance the
AbstractStrategy.validateConnectorDetectionCriteria
method to collect a newStatusInformation
parameter. This parameter will aggregate and append messages fromCriterionTestResult
instances found in theConnectorTestResult
.Add the
StatusInformation
value in thelegacyTextParameters
of theMonitor
typed asconnector
.The text was updated successfully, but these errors were encountered: