swaroopak commented on a change in pull request #773:
URL: https://github.com/apache/phoenix/pull/773#discussion_r418633830
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
##########
@@ -94,6 +106,33 @@ public void testReadIndexVerificationOutputRow() throws
Exception {
}
+ @Test
+ public void testTTLOnOutputTable() throws SQLException, IOException {
+ String mockString = "mock_value";
+ byte[] mockStringBytes = Strings.toByteArray(mockString);
+ ManualEnvironmentEdge customClock = new ManualEnvironmentEdge();
+ customClock.setValue(1);
+ EnvironmentEdgeManager.injectEdge(customClock);
+ try (Connection conn = DriverManager.getConnection(getUrl())) {
+ IndexVerificationOutputRepository
+ outputRepository =
+ new IndexVerificationOutputRepository(mockStringBytes,
conn);
+
+ outputRepository.createOutputTable(conn);
+ TestUtil.assertTableHasTtl(conn,
TableName.valueOf(OUTPUT_TABLE_NAME_BYTES), DEFAULT_LOG_TTL);
+ outputRepository.logToIndexToolOutputTable(mockStringBytes,
mockStringBytes,
+ 1, 2, mockString, mockStringBytes, mockStringBytes,
+ EnvironmentEdgeManager.currentTimeMillis(),
mockStringBytes, true);
+
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]