tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #44: TEPHRA-235 Ensure that TransactionSnapsho...
Date Wed, 21 Jun 2017 20:56:27 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/44#discussion_r123363497
  
    --- Diff: tephra-core/src/test/java/org/apache/tephra/snapshot/SnapshotCodecTest.java
---
    @@ -375,4 +386,17 @@ private void assertTransactionVisibilityStateEquals(TransactionVisibilityState
e
         Assert.assertEquals(expected.getInProgress(), input.getInProgress());
         Assert.assertEquals(expected.getInvalid(), input.getInvalid());
       }
    +
    +  private TransactionSnapshot assertSorted(TransactionSnapshot txSnapshot) {
    +    Collection<Long> invalidTxList = txSnapshot.getInvalid();
    +    if (invalidTxList.isEmpty()) {
    +      return txSnapshot;
    +    }
    +    Long previousLong = Iterables.get(invalidTxList, 0);
    +    for (Long aLong : invalidTxList) {
    +      Assert.assertTrue(aLong >= previousLong);
    --- End diff --
    
    Would be good to say sort error here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message