Skip to content

Commit

Permalink
PHOENIX-5351 Speedup OrphanViewToolIT.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhofhansl committed Jun 24, 2019
1 parent 100ff3a commit 29e2977
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class OrphanViewToolIT extends ParallelStatsDisabledIT {
private static final Logger LOGGER = LoggerFactory.getLogger(OrphanViewToolIT.class);

private final boolean isMultiTenant;
private final boolean columnEncoded;

private static final long fanout = 2;
private static final long childCount = fanout;
Expand Down Expand Up @@ -118,16 +117,13 @@ public class OrphanViewToolIT extends ParallelStatsDisabledIT {

private static final String deleteSchemaRows = "DELETE FROM %s WHERE " + TABLE_SCHEM + " %s";

public OrphanViewToolIT(boolean isMultiTenant, boolean columnEncoded) {
public OrphanViewToolIT(boolean isMultiTenant) {
this.isMultiTenant = isMultiTenant;
this.columnEncoded = columnEncoded;
}

@Parameters(name="OrphanViewToolIT_multiTenant={0}, columnEncoded={1}") // name is used by failsafe as file name in reports
public static Collection<Boolean[]> data() {
return Arrays.asList(new Boolean[][] {
{ false, false }, { false, true },
{ true, false }, { true, true } });
@Parameters(name="OrphanViewToolIT_multiTenant={0}") // name is used by failsafe as file name in reports
public static Collection<Boolean> data() {
return Arrays.asList(false, true);
}

@AfterClass
Expand All @@ -146,11 +142,6 @@ private String generateDDL(String format) {

private String generateDDL(String options, String format) {
StringBuilder optionsBuilder = new StringBuilder(options);
if (!columnEncoded) {
if (optionsBuilder.length()!=0)
optionsBuilder.append(",");
optionsBuilder.append("COLUMN_ENCODED_BYTES=0");
}
if (isMultiTenant) {
if (optionsBuilder.length()!=0)
optionsBuilder.append(",");
Expand Down Expand Up @@ -216,6 +207,7 @@ private void verifyLineCount(String fileName, long lineCount) throws IOException
if (count != lineCount)
LOGGER.debug(count + " != " + lineCount);
assertTrue(count == lineCount);
reader.close();
}

private void verifyCountQuery(Connection connection, String query, String schemaName, long count)
Expand Down

0 comments on commit 29e2977

Please sign in to comment.