Miscellaneous clean up, refactoring
Simplified FunctionCatalog structure by no longer registering the actual target function since it is available in wrapper anyway. Cleaned up logic in RequestProcessor
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.cloud.function.context.catalog;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
@@ -37,6 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class InMemoryFunctionCatalogTests {
|
||||
|
||||
@Test
|
||||
@Ignore // we no longer have a need to register the actual target function as it is contained within wrapper
|
||||
public void testFunctionRegistration() {
|
||||
TestFunction function = new TestFunction();
|
||||
FunctionRegistration<TestFunction> registration = new FunctionRegistration<>(
|
||||
|
||||
@@ -453,8 +453,8 @@ public class ContextFunctionCatalogAutoConfigurationTests {
|
||||
.lookup(Function.class, "function");
|
||||
assertThat(function.apply(Flux.just("foo")).blockFirst()).isEqualTo("FOO");
|
||||
assertThat(bean).isNotSameAs(function);
|
||||
assertThat(this.inspector.getRegistration(bean)).isNotNull();
|
||||
assertThat(this.inspector.getRegistration(bean).getType())
|
||||
assertThat(this.inspector.getRegistration(function)).isNotNull();
|
||||
assertThat(this.inspector.getRegistration(function).getType())
|
||||
.isEqualTo(this.inspector.getRegistration(function).getType());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user