Re-enable ignored tests

This commit is contained in:
Oleg Zhurakousky
2020-05-04 20:44:10 +02:00
parent c82d0f6ca5
commit e3ee776c04
6 changed files with 15 additions and 12 deletions

View File

@@ -200,7 +200,10 @@ public class RequestProcessor {
}
if (result instanceof Flux) {
result = Flux.from(result).collectList();
result = Flux.from(result).onErrorContinue((e, v) -> {
logger.error("Failed to process value: " + v, e);
})
.collectList();
}
return Mono.from(result).flatMap(body -> Mono.just(builder.body(body)));
}

View File

@@ -19,7 +19,6 @@ package org.springframework.cloud.function.scan;
import java.net.URI;
import java.util.function.Function;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import reactor.core.publisher.Flux;
@@ -63,7 +62,6 @@ public class ComponentTests {
}
@Test
@Ignore("FIXME")
public void greeter() throws Exception {
ResponseEntity<String> result = this.rest
.exchange(
@@ -71,7 +69,7 @@ public class ComponentTests {
.contentType(MediaType.TEXT_PLAIN).body("World"),
String.class);
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(result.getBody()).isEqualTo("Hello World");
assertThat(result.getBody()).isEqualTo("[\"Hello World\"]");
}
@SpringBootApplication

View File

@@ -18,7 +18,6 @@ package org.springframework.cloud.function.test;
import java.util.function.Function;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import reactor.core.publisher.Mono;
@@ -49,8 +48,6 @@ public class MoreThenOneFunctionRootMappingTests {
private WebTestClient client;
@Test
@Ignore // Effectively this is an invalid test, since it assumes the order of function composition which is wrong
// uppercase|reverse or reverse|uppercase?
public void words() throws Exception {
this.client.post().uri("/").body(Mono.just("star"), String.class).exchange()
.expectStatus().isOk().expectBody(String.class).isEqualTo("RATS");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ import java.util.function.Supplier;
import java.util.stream.Collectors;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import reactor.core.publisher.Flux;
@@ -101,7 +100,6 @@ public class HttpGetIntegrationTests {
}
@Test
@Ignore("Fix error handling")
public void errorJson() throws Exception {
assertThat(this.rest
.exchange(RequestEntity.get(new URI("/bang"))

View File

@@ -85,7 +85,6 @@ public class HttpPostIntegrationTests {
}
@Test
@Ignore
public void qualifierFoos() throws Exception {
ResponseEntity<String> result = this.rest.exchange(RequestEntity
.post(new URI("/foos")).contentType(MediaType.APPLICATION_JSON)
@@ -220,7 +219,6 @@ public class HttpPostIntegrationTests {
}
@Test
@Ignore
public void typelessFunctionPassingArray() throws Exception {
ResponseEntity<String> result = this.rest.exchange(
RequestEntity.post(new URI("/typelessFunctionExpectingText"))