GH-578 Fix FunctionRegistration lookup

The root of the issue was in implementation of  equals() and hashCode() of FunctionInvocationWrapper

Resolves #578
This commit is contained in:
Oleg Zhurakousky
2020-09-21 15:22:21 +02:00
parent 6df15f8a8a
commit 8a87f08525
3 changed files with 22 additions and 4 deletions

View File

@@ -92,6 +92,12 @@ public class RoutingFunctionTests {
.contentType(MediaType.TEXT_PLAIN)
.header("spring.cloud.function.definition", "echo")
.body("{\"name\":\"Bob\",\"age\":25}"), String.class);
postForEntity = this.rest
.exchange(RequestEntity.post(new URI("/functions/" + RoutingFunction.FUNCTION_NAME))
.contentType(MediaType.TEXT_PLAIN)
.header("spring.cloud.function.definition", "echo")
.body("{\"name\":\"Bob\",\"age\":25}"), String.class);
assertThat(postForEntity.getBody()).isEqualTo("{\"name\":\"Bob\",\"age\":25}");
assertThat(postForEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
}