Remove custom conditions from spring-cloud-function-stream
It didn't really make any sense to have custom conditions that depend on the presence or absence of beans of type Function, Supplier, Consumer because the actual endpoints are derived from the FunctionCatalog (which might not be based on bean definitions). This approach is far simpler, and reduces the amount of custom code in the stream binder. The spring.cloud.function.stream.supplier.enabled flag is awkward, so we should try and find a way to avoid that. There's also no reason it should need to be set in the deployer tests.
This commit is contained in:
@@ -76,7 +76,7 @@ public class FunctionAppDeployerTests {
|
||||
@Test
|
||||
public void web() throws Exception {
|
||||
String first = deploy("maven://com.example:function-sample:1.0.0.BUILD-SNAPSHOT",
|
||||
"");
|
||||
"", "--spring.cloud.function.stream.supplier.enabled=false");
|
||||
// Deployment is blocking so it either failed or succeeded.
|
||||
assertThat(deployer.status(first).getState()).isEqualTo(DeploymentState.deployed);
|
||||
deployer.undeploy(first);
|
||||
@@ -85,7 +85,8 @@ public class FunctionAppDeployerTests {
|
||||
@Test
|
||||
public void stream() throws Exception {
|
||||
String first = deploy("maven://com.example:function-sample:1.0.0.BUILD-SNAPSHOT",
|
||||
"spring.cloud.deployer.thin.profile=stream");
|
||||
"spring.cloud.deployer.thin.profile=stream",
|
||||
"--spring.cloud.function.stream.supplier.enabled=false", "--debug=true");
|
||||
// Deployment is blocking so it either failed or succeeded.
|
||||
assertThat(deployer.status(first).getState()).isEqualTo(DeploymentState.deployed);
|
||||
deployer.undeploy(first);
|
||||
|
||||
Reference in New Issue
Block a user