This is an automated email from the ASF dual-hosted git repository. seanyinx pushed a commit to branch SCB-100_async_support in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit 73e0cd2b9a8190f89431ae2d8b3491e10bf20455 Author: seanyinx <[email protected]> AuthorDate: Thu Jan 4 09:26:51 2018 +0800 SCB-100 more test coverage on executor proxy Signed-off-by: seanyinx <[email protected]> --- .../saga/omega/transaction/spring/TransactionInterceptionTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java index a2b7641..9597c6c 100644 --- a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java +++ b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java @@ -32,8 +32,8 @@ import static org.junit.Assert.assertThat; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; import org.apache.servicecomb.saga.omega.context.OmegaContext; import org.apache.servicecomb.saga.omega.context.UniqueIdGenerator; @@ -81,7 +81,7 @@ public class TransactionInterceptionTest { private final User jack = new User(usernameJack, uniquify("[email protected]")); @OmegaContextAware - private final ExecutorService executor = Executors.newSingleThreadExecutor(); + private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); @Autowired private List<String> messages; @@ -200,7 +200,7 @@ public class TransactionInterceptionTest { @Test public void passesOmegaContextInThreadPool() throws Exception { - executor.execute(() -> userService.add(user)); + executor.schedule(() -> userService.add(user), 0, MILLISECONDS); waitTillSavedUser(username); String newLocalTxId = omegaContext.newLocalTxId(); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
