This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit 6c87b3300b6fb78319002e325e186d40fba1dc4c Author: seanyinx <[email protected]> AuthorDate: Thu Jan 25 15:31:51 2018 +0800 SCB-278 attempted to fix random test failure by waiting a bit longer Signed-off-by: seanyinx <[email protected]> --- .../apache/servicecomb/saga/alpha/server/AlphaIntegrationTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/alpha/alpha-server/src/test/java/org/apache/servicecomb/saga/alpha/server/AlphaIntegrationTest.java b/alpha/alpha-server/src/test/java/org/apache/servicecomb/saga/alpha/server/AlphaIntegrationTest.java index 5dddc1d..539f610 100644 --- a/alpha/alpha-server/src/test/java/org/apache/servicecomb/saga/alpha/server/AlphaIntegrationTest.java +++ b/alpha/alpha-server/src/test/java/org/apache/servicecomb/saga/alpha/server/AlphaIntegrationTest.java @@ -361,9 +361,10 @@ public class AlphaIntegrationTest { blockingStub.onTxEvent(someGrpcEvent(TxEndedEvent, globalTxId, anotherLocalTxId)); - await().atMost(1, SECONDS).until(() -> eventRepo.count() == 8); - List<TxEvent> events = eventRepo.findByGlobalTxId(globalTxId); - assertThat(events.get(events.size() - 1).type(), is(SagaEndedEvent.name())); + await().atMost(1, SECONDS).until(() -> { + List<TxEvent> events = eventRepo.findByGlobalTxId(globalTxId); + return events.size() == 8 && events.get(events.size() - 1).type().equals(SagaEndedEvent.name()); + }); } private GrpcAck onCompensation(GrpcCompensateCommand command) { -- To stop receiving notification emails like this one, please contact [email protected].
