Github user anew commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/61#discussion_r139287927
--- Diff:
tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/coprocessor/TransactionVisibilityFilterTest.java
---
@@ -290,44 +290,52 @@ private void runFilteringTest(TxFilterFactory
txFilterFactory,
@Test
public void testTTLFiltering() throws Exception {
Map<byte[], Long> ttls = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
- ttls.put(FAM, 10L);
- ttls.put(FAM2, 30L);
+ ttls.put(FAM, 100L);
+ ttls.put(FAM2, 300L);
ttls.put(FAM3, 0L);
+ // start a transaction to populate the in-progress list. It should not
affect TTL calculations
+ txManager.startShort();
+
+ // commit a transaction, just to move the readPointer. Otherwise, the
TransactionVisibilityFilter will filter
+ // based upon the readPointer being smaller than the tested values,
whereas we want to test the TTL filtering
+ Transaction superShortTx = txManager.startShort();
--- End diff --
actually, you don't really need the txManager for this test. You can simply
construct a transaction that has the desired properties.
---