This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 3974b1681a Integration test exceptions fix (#11396)
3974b1681a is described below
commit 3974b1681ae433711974c0f5cb5dc1dee2260ad8
Author: Abhishek Sharma <[email protected]>
AuthorDate: Mon Aug 21 21:07:40 2023 -0400
Integration test exceptions fix (#11396)
---
.../apache/pinot/integration/tests/BaseClusterIntegrationTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
index 408558d7e5..fc50b2d931 100644
---
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
+++
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java
@@ -35,6 +35,7 @@ import java.util.Properties;
import javax.annotation.Nullable;
import org.apache.commons.io.FileUtils;
import org.apache.pinot.client.ConnectionFactory;
+import org.apache.pinot.client.ResultSetGroup;
import org.apache.pinot.common.utils.TarGzCompressionUtils;
import org.apache.pinot.common.utils.config.TagNameUtils;
import org.apache.pinot.plugin.inputformat.csv.CSVMessageDecoder;
@@ -716,7 +717,11 @@ public abstract class BaseClusterIntegrationTest extends
ClusterTest {
}
protected long getCurrentCountStarResult(String tableName) {
- return getPinotConnection().execute("SELECT COUNT(*) FROM " +
tableName).getResultSet(0).getLong(0);
+ ResultSetGroup resultSetGroup = getPinotConnection().execute("SELECT
COUNT(*) FROM " + tableName);
+ if (resultSetGroup.getResultSetCount() > 0) {
+ return resultSetGroup.getResultSet(0).getLong(0);
+ }
+ return 0;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]