This is an automated email from the ASF dual-hosted git repository. seanyinx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit cef4a82ad7da6807f0b00cf0c90cf43531743bb4 Author: seanyinx <[email protected]> AuthorDate: Sat Jan 13 15:33:21 2018 +0800 SCB-220 aborted tx was not supposed to be compensated Signed-off-by: seanyinx <[email protected]> --- .../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 "[email protected]" <[email protected]>.
