INT-1677 fixed thread safety for EvaluatioinContext since it has to be created per request due to the fact that we are adding request data to it
This commit is contained in:
committed by
Mark Fisher
parent
224db99c15
commit
75b32e1022
@@ -86,9 +86,7 @@ public class HttpRequestHandlingMessagingGatewayWithPathMappingTests {
|
||||
request.setParameter("foo", "bar");
|
||||
request.setContent("hello".getBytes());
|
||||
request.setRequestURI("/fname/bill/lname/clinton");
|
||||
|
||||
|
||||
|
||||
|
||||
HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
|
||||
gateway.setPath("/fname/{f}/lname/{l}");
|
||||
gateway.setRequestChannel(echoChannel);
|
||||
@@ -99,6 +97,7 @@ public class HttpRequestHandlingMessagingGatewayWithPathMappingTests {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void withoutPayloadExpressionPointingToUriVariables() throws Exception {
|
||||
|
||||
@@ -119,17 +118,13 @@ public class HttpRequestHandlingMessagingGatewayWithPathMappingTests {
|
||||
request.setContent("hello".getBytes());
|
||||
request.setRequestURI("/fname/bill/lname/clinton");
|
||||
|
||||
|
||||
|
||||
HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
|
||||
gateway.setPath("/fname/{f}/lname/{l}");
|
||||
gateway.setRequestChannel(echoChannel);
|
||||
gateway.setPayloadExpression(PARSER.parseExpression("#uriVariables"));
|
||||
|
||||
Object result = gateway.doHandleRequest(request, response);
|
||||
assertEquals("bill", ((Map)result).get("f"));
|
||||
|
||||
assertEquals("bill", ((Map<String, Object>)result).get("f"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user