Skip to content

Commit

Permalink
Remove createOracleQueryRunner overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Sep 30, 2020
1 parent bb5d930 commit 62c4da8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,7 @@ public final class OracleQueryRunner
{
private OracleQueryRunner() {}

public static DistributedQueryRunner createOracleQueryRunner(TestingOracleServer server, Iterable<TpchTable<?>> tables)
throws Exception
{
return createQueryRunner(server, tables, false);
}

public static DistributedQueryRunner createOraclePoolQueryRunner(TestingOracleServer server, Iterable<TpchTable<?>> tables)
throws Exception
{
return createQueryRunner(server, tables, true);
}

private static DistributedQueryRunner createQueryRunner(TestingOracleServer server, Iterable<TpchTable<?>> tables, boolean connectionPoolEnabled)
public static DistributedQueryRunner createOracleQueryRunner(TestingOracleServer server, Iterable<TpchTable<?>> tables, boolean connectionPoolEnabled)
throws Exception
{
DistributedQueryRunner queryRunner = null;
Expand Down Expand Up @@ -92,7 +80,8 @@ public static void main(String[] args)

DistributedQueryRunner queryRunner = createOracleQueryRunner(
new TestingOracleServer(),
TpchTable.getTables());
TpchTable.getTables(),
false);

Logger log = Logger.get(OracleQueryRunner.class);
log.info("======== SERVER STARTED ========");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ protected QueryRunner createQueryRunner()
throws Exception
{
this.oracleServer = new TestingOracleServer();
return OracleQueryRunner.createOracleQueryRunner(
oracleServer,
TpchTable.getTables());
return OracleQueryRunner.createOracleQueryRunner(oracleServer, TpchTable.getTables(), false);
}

@AfterClass(alwaysRun = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected QueryRunner createQueryRunner()
throws Exception
{
oracleServer = new TestingOracleServer();
return OracleQueryRunner.createOracleQueryRunner(oracleServer, ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION));
return OracleQueryRunner.createOracleQueryRunner(oracleServer, ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION), false);
}

@AfterClass(alwaysRun = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected QueryRunner createQueryRunner()
throws Exception
{
oracleServer = new TestingOracleServer();
return OracleQueryRunner.createOraclePoolQueryRunner(oracleServer, ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION));
return OracleQueryRunner.createOracleQueryRunner(oracleServer, ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION), true);
}

@AfterClass(alwaysRun = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import io.prestosql.testing.sql.SqlExecutor;
import org.testng.annotations.AfterClass;

import static io.prestosql.plugin.oracle.OracleQueryRunner.createOracleQueryRunner;

public class TestOracleTypeMapping
extends AbstractTestOracleTypeMapping
{
Expand All @@ -30,7 +28,7 @@ protected QueryRunner createQueryRunner()
throws Exception
{
this.oracleServer = new TestingOracleServer();
return createOracleQueryRunner(oracleServer, ImmutableList.of());
return OracleQueryRunner.createOracleQueryRunner(oracleServer, ImmutableList.of(), false);
}

@AfterClass(alwaysRun = true)
Expand Down

0 comments on commit 62c4da8

Please sign in to comment.