HuZheting opened a new issue #253: when AbortEvent is late URL: https://github.com/apache/incubator-servicecomb-saga/issues/253 I write a test in AlphaIntegrationTest, ` public void whenAbortEventIsLate(){ String sagaGlobalId = UUID.randomUUID().toString(); String localIdEntry = UUID.randomUUID().toString(); String localIdEndpoint = UUID.randomUUID().toString(); String anotherSagaGlobalId = UUID.randomUUID().toString(); String anotheEntryLocalId = UUID.randomUUID().toString(); String anotherEndPointLocalId = UUID.randomUUID().toString(); asyncStub.onConnected(serviceConfig, compensateResponseObserver); blockingStub.onTxEvent(someGrpcEvent(SagaStartedEvent, sagaGlobalId, localIdEntry)); blockingStub.onTxEvent(someGrpcEvent(SagaStartedEvent, anotherSagaGlobalId, anotheEntryLocalId)); blockingStub.onTxEvent(someGrpcEvent(TxStartedEvent, sagaGlobalId, localIdEndpoint)); blockingStub.onTxEvent(someGrpcEvent(TxEndedEvent, sagaGlobalId, localIdEndpoint)); await().atMost(1, SECONDS).until(() -> eventRepo.count() == 4); blockingStub.onTxEvent(someGrpcEvent(TxStartedEvent, anotherSagaGlobalId, anotherEndPointLocalId)); blockingStub.onTxEvent(someGrpcEvent(TxEndedEvent, anotherSagaGlobalId, anotherEndPointLocalId)); blockingStub.onTxEvent(someGrpcEvent(TxAbortedEvent, anotherSagaGlobalId, anotherEndPointLocalId)); await().atMost(2, SECONDS).until(() -> !receivedCommands.isEmpty()); assertThat(receivedCommands.poll().getGlobalTxId(), is(anotherSagaGlobalId)); blockingStub.onTxEvent(someGrpcEvent(TxAbortedEvent, sagaGlobalId, anotheEntryLocalId)); await().atMost(10, SECONDS).until(() -> receivedCommands.size() > 1); assertThat(receivedCommands.size(), is(2)); }` and the test fail.  It seems that the first uncompensate tx can not be found after another abort event is found before. I believe that the variable "nextEndedEventId" cause this problem.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
