@Test public void exceptionsInMidst() { ValidTxnList txns = new ValidCompactorTxnList(new long[] {8}, 8, 15); ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9); Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp); }
@Test public void minTxnHighNoExceptions() { ValidTxnList txns = new ValidCompactorTxnList(new long[0], -1, 5); ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9); Assert.assertEquals(ValidTxnList.RangeResponse.NONE, rsp); }
@Test public void maxTxnLowNoExceptions() { ValidTxnList txns = new ValidCompactorTxnList(new long[0], -1, 15); ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9); Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp); }
@Test public void maxTxnLow() { ValidTxnList txns = new ValidCompactorTxnList(new long[] {13, 14}, 13, 15); ValidTxnList.RangeResponse rsp = txns.isTxnRangeValid(7, 9); Assert.assertEquals(ValidTxnList.RangeResponse.ALL, rsp); }