This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.1 by this push: new e6cf8d9e0f PHOENIX-7062 Stabilize testDeletingStatsShouldNotFailWithADEWhenTableDropped e6cf8d9e0f is described below commit e6cf8d9e0f1480d6e12645dc4bf9147a3df1b183 Author: Istvan Toth <st...@apache.org> AuthorDate: Wed Oct 4 17:35:52 2023 +0200 PHOENIX-7062 Stabilize testDeletingStatsShouldNotFailWithADEWhenTableDropped --- .../java/org/apache/phoenix/end2end/BasePermissionsIT.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java index 77ae60018d..0674674dc9 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java @@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.security.access.AccessController; import org.apache.hadoop.hbase.security.access.Permission; import org.apache.hadoop.hbase.security.access.UserPermission; import org.apache.hadoop.hbase.shaded.protobuf.ResponseConverter; +import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread; import org.apache.phoenix.coprocessor.MetaDataProtocol; import org.apache.phoenix.jdbc.PhoenixConnection; @@ -569,6 +570,18 @@ public abstract class BasePermissionsIT extends BaseTest { try (Connection conn = getConnection(); Statement stmt = conn.createStatement();) { assertFalse(stmt.execute("UPDATE STATISTICS " + tableName + " SET \"" + QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB + "\" = 5")); + int retry = 20; + while (retry-- > 0) { + Thread.sleep(10000); + ResultSet rs = stmt.executeQuery( + "SELECT count(*) FROM SYSTEM.STATS where PHYSICAL_NAME = '" + + SchemaUtil.getPhysicalHBaseTableName(tableName.getBytes(), + isNamespaceMapped) + "'"); + rs.next(); + if (rs.getInt(1) > 0) { + break; + } + } } return null; }