You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by se...@apache.org on 2018/01/13 07:34:36 UTC

[incubator-servicecomb-saga] branch SCB-220_avoid_redundant_compensation updated: SCB-220 aborted tx was not supposed to be compensated

This is an automated email from the ASF dual-hosted git repository.

seanyinx pushed a commit to branch SCB-220_avoid_redundant_compensation
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git


The following commit(s) were added to refs/heads/SCB-220_avoid_redundant_compensation by this push:
     new 41a6d6c  SCB-220 aborted tx was not supposed to be compensated
41a6d6c is described below

commit 41a6d6c5baf0ff7643438d0af0b00c67d1af7477
Author: seanyinx <se...@huawei.com>
AuthorDate: Sat Jan 13 15:33:21 2018 +0800

    SCB-220 aborted tx was not supposed to be compensated
    
    Signed-off-by: seanyinx <se...@huawei.com>
---
 .../servicecomb/saga/integration/pack/tests/PackIT.java       | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/integration-tests/pack-tests/src/test/java/org/apache/servicecomb/saga/integration/pack/tests/PackIT.java b/integration-tests/pack-tests/src/test/java/org/apache/servicecomb/saga/integration/pack/tests/PackIT.java
index 7ed1b88..7a7f94e 100644
--- a/integration-tests/pack-tests/src/test/java/org/apache/servicecomb/saga/integration/pack/tests/PackIT.java
+++ b/integration-tests/pack-tests/src/test/java/org/apache/servicecomb/saga/integration/pack/tests/PackIT.java
@@ -136,7 +136,7 @@ public class PackIT {
 
     assertThat(entity.getStatusCode(), is(INTERNAL_SERVER_ERROR));
 
-    await().atMost(2, SECONDS).until(() -> repository.count() == 8);
+    await().atMost(2, SECONDS).until(() -> repository.count() == 7);
 
     List<String> distinctGlobalTxIds = repository.findDistinctGlobalTxId();
     assertThat(distinctGlobalTxIds.size(), is(1));
@@ -170,14 +170,7 @@ public class PackIT {
     assertThat(txCompensatedEvent1.serviceName(), is(serviceName));
     assertThat(txCompensatedEvent1.instanceId(), is(txStartedEvent1.instanceId()));
 
-    TxEventEnvelope txCompensatedEvent2 = envelopes.get(6);
-    assertThat(txCompensatedEvent2.type(), is("TxCompensatedEvent"));
-    assertThat(txCompensatedEvent2.localTxId(), is(txStartedEvent2.localTxId()));
-    assertThat(txCompensatedEvent2.parentTxId(), is(globalTxId));
-    assertThat(txCompensatedEvent2.serviceName(), is(serviceName));
-    assertThat(txCompensatedEvent2.instanceId(), is(txStartedEvent2.instanceId()));
-
-    assertThat(envelopes.get(7).type(), is("SagaEndedEvent"));
+    assertThat(envelopes.get(6).type(), is("SagaEndedEvent"));
 
     assertThat(compensatedMessages, contains(
         "Goodbye, " + TRESPASSER,

-- 
To stop receiving notification emails like this one, please contact
['"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>'].