From e6e25791d6b9c8360247d92340b0dccda33c86ed Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 27 Sep 2017 09:04:52 +0000 Subject: Revert "commons-dbcp2 -> tomcat-jdbc" This reverts commit a0fba35796e6dfb1188d716985e1d483bf1098c4. --- src/test/java/com/juick/tests/ApiTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java index d97f84d2..51641c1d 100644 --- a/src/test/java/com/juick/tests/ApiTests.java +++ b/src/test/java/com/juick/tests/ApiTests.java @@ -32,6 +32,7 @@ import com.juick.service.TagService; import com.juick.service.UserService; import com.juick.service.search.SearchService; import com.juick.www.WebApp; +import org.apache.commons.dbcp2.BasicDataSource; import org.apache.commons.lang3.StringUtils; import org.junit.Before; import org.junit.Test; @@ -52,7 +53,6 @@ import org.springframework.transaction.annotation.TransactionManagementConfigure import ru.sape.Sape; import javax.inject.Inject; -import javax.sql.DataSource; import java.lang.reflect.InvocationTargetException; import java.text.ParseException; import java.util.ArrayList; @@ -73,13 +73,13 @@ public class ApiTests { @ComponentScan(basePackages = {"com.juick.service", "com.juick.server.protocol"}) static class Config implements TransactionManagementConfigurer { @Bean - public DataSource dataSource() { + public BasicDataSource dataSource() { try { DB db = DB.newEmbeddedDB(33306); db.start(); db.createDB("juick"); db.source("schema.sql"); - org.apache.tomcat.jdbc.pool.DataSource dataSource = new org.apache.tomcat.jdbc.pool.DataSource(); + BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:33306/juick?autoReconnect=true&user=root"); -- cgit v1.2.3