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:
Oleg Zhurakousky
2011-09-01 15:15:32 -04:00
committed by Mark Fisher
parent 224db99c15
commit 75b32e1022
2 changed files with 24 additions and 33 deletions

View File

@@ -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"));
}
}