Commit b3d33754 authored by Phillip Webb's avatar Phillip Webb

Remove outdated FIXMEs from tests

Closes gh-19782
parent c85918b8
...@@ -204,8 +204,6 @@ public class ReactiveCloudFoundrySecurityServiceTests { ...@@ -204,8 +204,6 @@ public class ReactiveCloudFoundrySecurityServiceTests {
}); });
StepVerifier.create(this.securityService.getUaaUrl()) StepVerifier.create(this.securityService.getUaaUrl())
.consumeNextWith((uaaUrl) -> assertThat(uaaUrl).isEqualTo(UAA_URL)).expectComplete().verify(); .consumeNextWith((uaaUrl) -> assertThat(uaaUrl).isEqualTo(UAA_URL)).expectComplete().verify();
// this.securityService.getUaaUrl().block(); //FIXME subscribe again to check that
// it isn't called again
expectRequest((request) -> assertThat(request.getPath()).isEqualTo(CLOUD_CONTROLLER + "/info")); expectRequest((request) -> assertThat(request.getPath()).isEqualTo(CLOUD_CONTROLLER + "/info"));
expectRequestCount(1); expectRequestCount(1);
} }
......
...@@ -42,7 +42,6 @@ public class InfoEndpointAutoConfigurationTests { ...@@ -42,7 +42,6 @@ public class InfoEndpointAutoConfigurationTests {
@Test @Test
public void runShouldHaveEndpointBeanEvenIfDefaultIsDisabled() { public void runShouldHaveEndpointBeanEvenIfDefaultIsDisabled() {
// FIXME
this.contextRunner.withPropertyValues("management.endpoint.default.enabled:false") this.contextRunner.withPropertyValues("management.endpoint.default.enabled:false")
.run((context) -> assertThat(context).hasSingleBean(InfoEndpoint.class)); .run((context) -> assertThat(context).hasSingleBean(InfoEndpoint.class));
} }
......
...@@ -79,18 +79,18 @@ public class JmxEndpointDiscovererTests { ...@@ -79,18 +79,18 @@ public class JmxEndpointDiscovererTests {
assertThat(getSomething.getDescription()).isEqualTo("Invoke getSomething for endpoint test"); assertThat(getSomething.getDescription()).isEqualTo("Invoke getSomething for endpoint test");
assertThat(getSomething.getOutputType()).isEqualTo(String.class); assertThat(getSomething.getOutputType()).isEqualTo(String.class);
assertThat(getSomething.getParameters()).hasSize(1); assertThat(getSomething.getParameters()).hasSize(1);
hasDefaultParameter(getSomething, 0, String.class); assertThat(getSomething.getParameters().get(0).getType()).isEqualTo(String.class);
JmxOperation update = operationByName.get("update"); JmxOperation update = operationByName.get("update");
assertThat(update.getDescription()).isEqualTo("Invoke update for endpoint test"); assertThat(update.getDescription()).isEqualTo("Invoke update for endpoint test");
assertThat(update.getOutputType()).isEqualTo(Void.TYPE); assertThat(update.getOutputType()).isEqualTo(Void.TYPE);
assertThat(update.getParameters()).hasSize(2); assertThat(update.getParameters()).hasSize(2);
hasDefaultParameter(update, 0, String.class); assertThat(update.getParameters().get(0).getType()).isEqualTo(String.class);
hasDefaultParameter(update, 1, String.class); assertThat(update.getParameters().get(1).getType()).isEqualTo(String.class);
JmxOperation deleteSomething = operationByName.get("deleteSomething"); JmxOperation deleteSomething = operationByName.get("deleteSomething");
assertThat(deleteSomething.getDescription()).isEqualTo("Invoke deleteSomething for endpoint test"); assertThat(deleteSomething.getDescription()).isEqualTo("Invoke deleteSomething for endpoint test");
assertThat(deleteSomething.getOutputType()).isEqualTo(Void.TYPE); assertThat(deleteSomething.getOutputType()).isEqualTo(Void.TYPE);
assertThat(deleteSomething.getParameters()).hasSize(1); assertThat(deleteSomething.getParameters()).hasSize(1);
hasDefaultParameter(deleteSomething, 0, String.class); assertThat(deleteSomething.getParameters().get(0).getType()).isEqualTo(String.class);
}); });
} }
...@@ -239,12 +239,6 @@ public class JmxEndpointDiscovererTests { ...@@ -239,12 +239,6 @@ public class JmxEndpointDiscovererTests {
assertThat(parameter.getDescription()).isEqualTo(description); assertThat(parameter.getDescription()).isEqualTo(description);
} }
// FIXME rename
private void hasDefaultParameter(JmxOperation operation, int index, Class<?> type) {
JmxOperationParameter parameter = operation.getParameters().get(index);
assertThat(parameter.getType()).isEqualTo(type);
}
private Map<EndpointId, ExposableJmxEndpoint> discover(JmxEndpointDiscoverer discoverer) { private Map<EndpointId, ExposableJmxEndpoint> discover(JmxEndpointDiscoverer discoverer) {
Map<EndpointId, ExposableJmxEndpoint> byId = new HashMap<>(); Map<EndpointId, ExposableJmxEndpoint> byId = new HashMap<>();
discoverer.getEndpoints().forEach((endpoint) -> byId.put(endpoint.getEndpointId(), endpoint)); discoverer.getEndpoints().forEach((endpoint) -> byId.put(endpoint.getEndpointId(), endpoint));
......
...@@ -55,7 +55,6 @@ public class HikariDataSourceConfigurationTests { ...@@ -55,7 +55,6 @@ public class HikariDataSourceConfigurationTests {
assertThat(ds.getJdbcUrl()).isEqualTo("jdbc:foo//bar/spam"); assertThat(ds.getJdbcUrl()).isEqualTo("jdbc:foo//bar/spam");
assertThat(ds.getMaxLifetime()).isEqualTo(1234); assertThat(ds.getMaxLifetime()).isEqualTo(1234);
}); });
// TODO: test JDBC4 isValid()
} }
@Test @Test
......
...@@ -51,6 +51,7 @@ public class OutputCapture implements TestRule { ...@@ -51,6 +51,7 @@ public class OutputCapture implements TestRule {
@Override @Override
public Statement apply(Statement base, Description description) { public Statement apply(Statement base, Description description) {
return new Statement() { return new Statement() {
@Override @Override
public void evaluate() throws Throwable { public void evaluate() throws Throwable {
captureOutput(); captureOutput();
...@@ -69,11 +70,11 @@ public class OutputCapture implements TestRule { ...@@ -69,11 +70,11 @@ public class OutputCapture implements TestRule {
} }
} }
} }
}; };
} }
protected void captureOutput() { protected void captureOutput() {
// FIXME AnsiOutput.setEnabled(Enabled.NEVER);
this.copy = new ByteArrayOutputStream(); this.copy = new ByteArrayOutputStream();
this.captureOut = new CaptureOutputStream(System.out, this.copy); this.captureOut = new CaptureOutputStream(System.out, this.copy);
this.captureErr = new CaptureOutputStream(System.err, this.copy); this.captureErr = new CaptureOutputStream(System.err, this.copy);
...@@ -82,7 +83,6 @@ public class OutputCapture implements TestRule { ...@@ -82,7 +83,6 @@ public class OutputCapture implements TestRule {
} }
protected void releaseOutput() { protected void releaseOutput() {
// FIXME AnsiOutput.setEnabled(Enabled.DETECT);
System.setOut(this.captureOut.getOriginal()); System.setOut(this.captureOut.getOriginal());
System.setErr(this.captureErr.getOriginal()); System.setErr(this.captureErr.getOriginal());
this.copy = null; this.copy = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment