You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/05/01 17:01:24 UTC

[GitHub] [phoenix] swaroopak commented on a change in pull request #773: PHOENIX-5874: IndexTool does not set TTL on its log tables correctly

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:
users@infra.apache.org