Making tests less brittle

This commit is contained in:
Marcin Grzejszczak
2021-02-26 10:20:53 +01:00
parent 081171b699
commit 4b123747b3

View File

@@ -48,7 +48,8 @@ public class TraceNoWebEnvironmentTests {
client.createSomeTestRequest();
}
catch (Exception e) {
then(e.getCause().getClass())
Throwable cause = e.getCause() != null ? e.getCause() : e;
then(cause.getClass())
.isNotEqualTo(NoSuchBeanDefinitionException.class);
}
}