Skip to content

Commit 13d9947

Browse files
committed
Add Class.forName("org.h2.Driver") in H2QueryRunner
1 parent f41a178 commit 13d9947

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

presto-tests/src/main/java/com/facebook/presto/tests/H2QueryRunner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ public class H2QueryRunner
105105
{
106106
private final Handle handle;
107107

108-
public H2QueryRunner()
108+
public H2QueryRunner() throws Exception
109109
{
110+
Class.forName("org.h2.Driver");
111+
110112
handle = Jdbi.open("jdbc:h2:mem:test" + System.nanoTime() + "_" + ThreadLocalRandom.current().nextInt());
111113
TpchMetadata tpchMetadata = new TpchMetadata("");
112114

presto-tests/src/test/java/com/facebook/presto/tests/TestH2QueryRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class TestH2QueryRunner
3333
private H2QueryRunner h2QueryRunner;
3434

3535
@BeforeClass
36-
public void init()
36+
public void init() throws Exception
3737
{
3838
h2QueryRunner = new H2QueryRunner();
3939
}

0 commit comments

Comments
 (0)