mcvsubbu commented on a change in pull request #4729: Adding logs for
"waitForAllDocsLoaded"
URL: https://github.com/apache/incubator-pinot/pull/4729#discussion_r337782477
##########
File path:
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
##########
@@ -364,18 +367,32 @@ protected long getCurrentCountStarResult()
* @param timeoutMs Timeout in milliseconds
* @throws Exception
*/
- protected void waitForAllDocsLoaded(long timeoutMs)
- throws Exception {
+ protected void waitForAllDocsLoaded(long timeoutMs) throws Exception {
final long countStarResult = getCountStarResult();
TestUtils.waitForCondition(new Function<Void, Boolean>() {
@Nullable
@Override
public Boolean apply(@Nullable Void aVoid) {
+ long currentResult;
try {
- return getCurrentCountStarResult() == countStarResult;
+ currentResult = getCurrentCountStarResult();
} catch (Exception e) {
return null;
}
+
+ // Add more information to logs
+ if (currentResult == countStarResult) {
+ return true;
+ } else if (currentResult < countStarResult) {
+ LOGGER.info("Docs are not fully loaded yet (current: {}, expected:
{})", currentResult, countStarResult);
Review comment:
In that case, let us change this particular waitForCondition call to be
every 10 seconds.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]