diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java index 220edee05c4..69b8e4e7f75 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java @@ -34,10 +34,12 @@ import java.util.Arrays; import java.util.Collection; import java.util.Properties; +import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.schema.PTableImpl; import org.apache.phoenix.schema.types.PVarbinary; import org.apache.phoenix.util.PropertiesUtil; +import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -82,6 +84,15 @@ public VarBinaryEncoded1IT(boolean columnEncoded, String transactionProvider, bo this.isBindStatement = isBindStatement; } + // Each test case creates new tables. Drop them after each case, because hundreds of open + // regions in one class exhaust the heap of the test JVM. The test driver keeps the HBase + // table when Phoenix drops a table, so drop the HBase tables also. + @After + public void dropTables() throws Exception { + deletePriorMetaData(HConstants.LATEST_TIMESTAMP, getUrl()); + disableAndDropNonSystemTables(); + } + @Parameterized.Parameters( name = "VarBinary1IT_columnEncoded={0}, transactionProvider={1}, mutable={2}," + " isBindStatement={3}")