aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-09-25 02:02:34 +0300
committerGravatar Vitaly Takmazov2017-09-25 02:02:34 +0300
commita0fba35796e6dfb1188d716985e1d483bf1098c4 (patch)
tree28d0baf4961e077c7fd72797af0df3debfc860bd /src/test/java
parentb9307ab9fe0b6bd56db27dce0ccb8963b11c5766 (diff)
commons-dbcp2 -> tomcat-jdbc
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/juick/tests/ApiTests.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java
index 51641c1d..d97f84d2 100644
--- a/src/test/java/com/juick/tests/ApiTests.java
+++ b/src/test/java/com/juick/tests/ApiTests.java
@@ -32,7 +32,6 @@ 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;
@@ -53,6 +52,7 @@ 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 BasicDataSource dataSource() {
+ public DataSource dataSource() {
try {
DB db = DB.newEmbeddedDB(33306);
db.start();
db.createDB("juick");
db.source("schema.sql");
- BasicDataSource dataSource = new BasicDataSource();
+ org.apache.tomcat.jdbc.pool.DataSource dataSource = new org.apache.tomcat.jdbc.pool.DataSource();
dataSource.setDriverClassName("com.mysql.jdbc.Driver");
dataSource.setUrl("jdbc:mysql://localhost:33306/juick?autoReconnect=true&user=root");