Fixed failing adapter tests
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user