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 [email protected] or file a JIRA ticket
with INFRA.
---