GH-489 the received data which Post Flux data to FunctionController is not same as the function apply

fix test case
This commit is contained in:
谭繁华
2020-04-09 09:31:51 +08:00
committed by Oleg Zhurakousky
parent 29dc59bb7e
commit 719f3745f0
5 changed files with 77 additions and 10 deletions

View File

@@ -308,8 +308,7 @@ public class HttpPostIntegrationTests {
@Test
public void uppercaseSSE() throws Exception {
assertThat(this.rest.exchange(RequestEntity.post(new URI("/uppercase"))
.accept(EVENT_STREAM).contentType(MediaType.APPLICATION_JSON)
assertThat(this.rest.exchange(RequestEntity.post(new URI("/uppercase")).contentType(MediaType.APPLICATION_JSON)
.body("[\"foo\",\"bar\"]"), String.class).getBody())
.isEqualTo(sse("(FOO)", "(BAR)"));
}
@@ -361,7 +360,7 @@ public class HttpPostIntegrationTests {
}
private String sse(String... values) {
return "data:" + StringUtils.arrayToDelimitedString(values, "\n\ndata:") + "\n\n";
return "[\"" + StringUtils.arrayToDelimitedString(values, "\",\"") + "\"]";
}
@EnableAutoConfiguration