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 09:03:12 UTC

[incubator-servicecomb-saga] branch SCB-220_avoid_redundant_compensation updated (065eb25 -> 8aa9737)

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

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


    omit 065eb25  SCB-220 aborted tx was not supposed to be compensated
     new 8aa9737  SCB-220 aborted tx was not supposed to be compensated

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (065eb25)
            \
             N -- N -- N   refs/heads/SCB-220_avoid_redundant_compensation (8aa9737)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/servicecomb/saga/integration/pack/tests/PackIT.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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

[incubator-servicecomb-saga] 01/01: SCB-220 aborted tx was not supposed to be compensated

Posted by se...@apache.org.
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

commit 8aa97373e0914fd49bb49c257a40c65bcc765fdb
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 | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 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..0a340db 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,14 +136,14 @@ 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));
 
     String globalTxId = distinctGlobalTxIds.get(0);
     List<TxEventEnvelope> envelopes = repository.findByGlobalTxIdOrderByCreationTime(globalTxId);
-    assertThat(envelopes.size(), is(8));
+    assertThat(envelopes.size(), is(7));
 
     TxEventEnvelope sagaStartedEvent = envelopes.get(0);
     assertThat(sagaStartedEvent.type(), is("SagaStartedEvent"));
@@ -170,18 +170,9 @@ 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(6).type(), is("SagaEndedEvent"));
 
-    assertThat(envelopes.get(7).type(), is("SagaEndedEvent"));
-
-    assertThat(compensatedMessages, contains(
-        "Goodbye, " + TRESPASSER,
-        "My bad, please take the window instead, " + TRESPASSER));
+    assertThat(compensatedMessages, contains("Goodbye, " + TRESPASSER));
   }
 
   @Test(timeout = 5000)

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