Ensure async Callables are in sync with the call stack
After this change each call stack level pushes and pops an async Callable to ensure the AsyncExecutionChain is in sync with the call stack. Before this change, a controller returning a "forward:" prefixed string caused the AsyncExecutionChain to contain a extra Callables that did not match the actual call stack. Issue: SPR-9611
This commit is contained in:
@@ -176,7 +176,7 @@ public class OpenSessionInViewTests {
|
||||
verify(sf);
|
||||
verify(session);
|
||||
|
||||
asyncCallable.setNextCallable(new Callable<Object>() {
|
||||
asyncCallable.setNext(new Callable<Object>() {
|
||||
public Object call() {
|
||||
return null;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ public class OpenSessionInViewTests {
|
||||
verify(asyncWebRequest);
|
||||
|
||||
chain.setTaskExecutor(new SyncTaskExecutor());
|
||||
chain.setCallable(new Callable<Object>() {
|
||||
chain.setLastCallable(new Callable<Object>() {
|
||||
public Object call() {
|
||||
assertTrue(TransactionSynchronizationManager.hasResource(sf));
|
||||
return null;
|
||||
@@ -503,7 +503,7 @@ public class OpenSessionInViewTests {
|
||||
replay(sf);
|
||||
replay(session);
|
||||
|
||||
chain.startCallableChainProcessing();
|
||||
chain.startCallableProcessing();
|
||||
assertFalse(TransactionSynchronizationManager.hasResource(sf));
|
||||
|
||||
verify(sf);
|
||||
|
||||
Reference in New Issue
Block a user