ChinmaySKulkarni commented on a change in pull request #550: PHOENIX-5348: Fix
flaky test: testIndexRebuildTask
URL: https://github.com/apache/phoenix/pull/550#discussion_r309031784
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexRebuildTaskIT.java
##########
@@ -129,45 +128,42 @@ public void testIndexRebuildTask() throws Throwable {
Task.addTask(conn.unwrap(PhoenixConnection.class),
PTable.TaskType.INDEX_REBUILD,
TENANT1, null, viewName,
PTable.TaskStatus.CREATED.toString(), data, null, startTs,
null, true);
-
-
+ conn.commit();
task.run();
+ waitForTaskState(conn, PTable.TaskType.INDEX_REBUILD, viewName,
startTs, PTable.TaskStatus.COMPLETED);
String viewIndexTableName =
MetaDataUtil.getViewIndexPhysicalName(baseTable);
ConnectionQueryServices queryServices =
conn.unwrap(PhoenixConnection.class).getQueryServices();
int count =
getUtility().countRows(queryServices.getTable(Bytes.toBytes(viewIndexTableName)));
assertTrue(count == numOfValues);
Review comment:
Not part of your diffs, but we can replace this with `assertEquals` instead
----------------------------------------------------------------
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