dbwong commented on a change in pull request #550: PHOENIX-5348: Fix flaky 
test: testIndexRebuildTask
URL: https://github.com/apache/phoenix/pull/550#discussion_r307917251
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/schema/task/Task.java
 ##########
 @@ -230,7 +232,20 @@ public static void deleteTask(PhoenixConnection conn, 
PTable.TaskType taskType,
                 taskQuery += " AND " + PhoenixDatabaseMetaData.TASK_DATA + " 
LIKE '%" + indexName + "%'";
             }
 
-        return populateTasks(connection, taskQuery);
+            List<TaskRecord> taskRecords = populateTasks(connection, 
taskQuery);
+            List<TaskRecord> result = new ArrayList<TaskRecord>();
+            if (ts != null) {
 
 Review comment:
   Let me try again I accidentally commented in test code.  Here we have a 
simple logic change where we query against a property.  This is tested in the 
ITs but it is good to test with a small simple unit test.  However, it might 
pose a bit more difficult to test if there isn't a boundary between the data 
layer and the logic.  This may inform how to shape our code.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to