You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/01/05 01:15:56 UTC
[incubator-servicecomb-saga] 06/08: SCB-100 more test coverage on
executor proxy
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit ece5ed6d1677731b5ec4bb0d7026d2502df63c98
Author: seanyinx <se...@huawei.com>
AuthorDate: Thu Jan 4 09:26:51 2018 +0800
SCB-100 more test coverage on executor proxy
Signed-off-by: seanyinx <se...@huawei.com>
---
.../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("jack@gmail.com"));
@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
"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>.