Added method to clear datasource field after use.
This commit is contained in:
parent
910e63f83c
commit
315d4a247f
|
@ -4,6 +4,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -28,6 +29,11 @@ public class JdbcTokenRepositoryImplTests {
|
|||
dataSource = new DriverManagerDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:tokenrepotest", "sa", "");
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void clearDataSource() {
|
||||
dataSource = null;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void populateDatabase() {
|
||||
repo = new JdbcTokenRepositoryImpl();
|
||||
|
|
Loading…
Reference in New Issue