seanyinx commented on a change in pull request #122: SCB-239 omega stateless URL: https://github.com/apache/incubator-servicecomb-saga/pull/122#discussion_r165667413
########## File path: alpha/alpha-core/src/test/java/org/apache/servicecomb/saga/alpha/core/TxConsistentServiceTest.java ########## @@ -70,6 +78,29 @@ public void deleteDuplicateEvents(String type) { } }; + private final Deque<TxTimeout> timeouts = new ConcurrentLinkedDeque<>(); + private final TxTimeoutRepository timeoutRepository = new TxTimeoutRepository() { + @Override + public void save(TxTimeout timeout) { + timeouts.add(timeout); + } + + @Override + public void markTxTimeoutAsDone(String globalTxId, String localTxId) { + for (TxTimeout timeout : timeouts) { + if (timeout.globalTxId().equals(globalTxId) && timeout.localTxId().equals(localTxId)) { + timeout.setStatus(DONE.name()); + break; + } + } + } + + @Override + public List<TxEvent> findFirstTimeoutTxToAbort() { + return null; Review comment: empty list instead of null ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services