4747import javax .servlet .http .HttpServletResponse ;
4848import java .net .InetSocketAddress ;
4949import java .sql .Connection ;
50- import java .sql .DriverManager ;
5150import java .sql .PreparedStatement ;
52- import java .sql .SQLException ;
5351import java .util .Arrays ;
5452import java .util .Collections ;
5553import java .util .Enumeration ;
@@ -110,7 +108,7 @@ public ElasticApmContinuousBenchmark(boolean apmEnabled) {
110108 }
111109
112110 @ Setup
113- public void setUp (Blackhole blackhole ) throws SQLException {
111+ public void setUp (Blackhole blackhole ) {
114112 server = Undertow .builder ()
115113 .addHttpListener (0 , "127.0.0.1" )
116114 .setHandler (exchange -> {
@@ -135,11 +133,7 @@ public void setUp(Blackhole blackhole) throws SQLException {
135133 final BlackholeConnection blackholeConnection = BlackholeConnection .INSTANCE ;
136134 blackholeConnection .init (blackhole );
137135
138- Connection connection = DriverManager .getConnection ("jdbc:h2:mem:test" , "user" , "" );
139- connection .createStatement ().execute ("CREATE TABLE IF NOT EXISTS ELASTIC_APM (FOO INT, BAR VARCHAR(255))" );
140- connection .createStatement ().execute ("INSERT INTO ELASTIC_APM (FOO, BAR) VALUES (1, 'APM')" );
141-
142- httpServlet = new BenchmarkingServlet (connection , tracer , blackhole );
136+ httpServlet = new BenchmarkingServlet (blackholeConnection , tracer , blackhole );
143137 }
144138
145139 @ TearDown
0 commit comments