You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/02/14 03:37:04 UTC
[GitHub] coolbeevip opened a new pull request #406: [SCB-1152] Fixed test
case logic to determine defects
coolbeevip opened a new pull request #406: [SCB-1152] Fixed test case logic to determine defects
URL: https://github.com/apache/servicecomb-pack/pull/406
class AlphaIntegrationTest method abortTimeoutTxStartedEvent defects
```
await().atMost(2, SECONDS).until(() -> {
List<TxEvent> events = eventRepo.findByGlobalTxId(globalTxId);
return eventRepo.count() == 5 && events.get(events.size() - 1).type().equals(SagaEndedEvent.name());
});
```
Sometimes although eventRepo.count()==5 but there events list of results as follows
```
SagaStartedEvent
TxStartedEvent
TxAbortedEvent
SagaEndedEvent
SagaEndedEvent
```
compensation has not yet executed a cycle (method deleteDuplicateSagaEndedEvents() has not been executed yet), TxCompensatedEvent has not been added yet, but the condition eventRepo.count()==5 is met, so I changed to the following
```
await().atMost(2, SECONDS).until(() -> {
List<TxEvent> events = eventRepo.findByGlobalTxId(globalTxId);
return eventRepo.count() == 5 && events.get(events.size() - 1).type().equals(SagaEndedEvent.name()) && !events.get(events.size() - 2).type().equals(SagaEndedEvent.name());
});
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services