use of org.opensearch.common.io.stream.NotSerializableExceptionWrapper in project anomaly-detection by opensearch-project.
the class NotSerializedADExceptionNameTests method testConvertClientException.
public void testConvertClientException() {
Optional<AnomalyDetectionException> converted = NotSerializedADExceptionName.convertWrappedAnomalyDetectionException(new NotSerializableExceptionWrapper(new ClientException("", "")), "");
assertTrue(converted.isPresent());
assertTrue(converted.get() instanceof ClientException);
}
use of org.opensearch.common.io.stream.NotSerializableExceptionWrapper in project anomaly-detection by opensearch-project.
the class NotSerializedADExceptionNameTests method testUnknownException.
public void testUnknownException() {
Optional<AnomalyDetectionException> converted = NotSerializedADExceptionName.convertWrappedAnomalyDetectionException(new NotSerializableExceptionWrapper(new RuntimeException("")), "");
assertTrue(!converted.isPresent());
}
use of org.opensearch.common.io.stream.NotSerializableExceptionWrapper in project anomaly-detection by opensearch-project.
the class NotSerializedADExceptionNameTests method testConvertADValidationException.
public void testConvertADValidationException() {
Optional<AnomalyDetectionException> converted = NotSerializedADExceptionName.convertWrappedAnomalyDetectionException(new NotSerializableExceptionWrapper(new ADValidationException("", null, null)), "");
assertTrue(converted.isPresent());
assertTrue(converted.get() instanceof ADValidationException);
}
use of org.opensearch.common.io.stream.NotSerializableExceptionWrapper in project anomaly-detection by opensearch-project.
the class NotSerializedADExceptionNameTests method testConvertDuplicateTaskException.
public void testConvertDuplicateTaskException() {
Optional<AnomalyDetectionException> converted = NotSerializedADExceptionName.convertWrappedAnomalyDetectionException(new NotSerializableExceptionWrapper(new DuplicateTaskException("")), "");
assertTrue(converted.isPresent());
assertTrue(converted.get() instanceof DuplicateTaskException);
}
use of org.opensearch.common.io.stream.NotSerializableExceptionWrapper in project anomaly-detection by opensearch-project.
the class NotSerializedADExceptionNameTests method testConvertAnomalyDetectionException.
public void testConvertAnomalyDetectionException() {
Optional<AnomalyDetectionException> converted = NotSerializedADExceptionName.convertWrappedAnomalyDetectionException(new NotSerializableExceptionWrapper(new AnomalyDetectionException("", "")), "");
assertTrue(converted.isPresent());
assertTrue(converted.get() instanceof AnomalyDetectionException);
}
Aggregations