Fixed failing adapter tests

This commit is contained in:
Oleg Zhurakousky
2019-06-06 15:02:36 +02:00
parent 52b8d67092
commit 3c354d94a4
2 changed files with 16 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ import java.util.function.Supplier;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import org.junit.After;
import org.junit.Test;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
@@ -43,6 +45,11 @@ public class SpringBootApiGatewayRequestHandlerTests {
private SpringBootApiGatewayRequestHandler handler;
@After
public void after() {
System.clearProperty("function.name");
}
@Test
public void supplierBean() {
System.setProperty("function.name", "supplier");

View File

@@ -23,6 +23,8 @@ import java.util.Map;
import java.util.function.Function;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.After;
import org.junit.Test;
import reactor.core.publisher.Flux;
@@ -44,6 +46,13 @@ public class SpringBootStreamHandlerTests {
private SpringBootStreamHandler handler;
@After
public void after() {
if (handler != null) {
handler.close();
}
}
@Test
public void functionBeanWithJacksonConfig() throws Exception {
this.handler = new SpringBootStreamHandler(FunctionConfigWithJackson.class);