Moves back to assertThrows

This commit is contained in:
Spencer Gibb
2020-04-16 10:40:42 -04:00
parent 62b3fa04aa
commit d662e2edbe

View File

@@ -38,8 +38,7 @@ public class ConsulPropertySourceLocatorRetryTests {
@Test
public void testRetry() {
//Assert.assertThrows(TransportException.class, () -> {
try {
Assert.assertThrows(TransportException.class, () -> {
new SpringApplicationBuilder(Config.class).properties(
"spring.application.name=testConsulPropertySourceLocatorRetry",
"spring.cloud.consul.host=53210a7c-4809-42cb-8b30-057d2db85fcc",
@@ -48,11 +47,7 @@ public class ConsulPropertySourceLocatorRetryTests {
"spring.cloud.consul.retry.maxAttempts=1",
"spring.cloud.consul.config.failFast=true").run();
Assert.fail("Did not throw TransportException");
}
catch (TransportException e) {
// success
}
//});
});
assertThat(output).contains("RetryContext retrieved");
}