|
16 | 16 |
|
17 | 17 | package org.springframework.test.context.junit4;
|
18 | 18 |
|
19 |
| -import static org.junit.Assert.assertEquals; |
20 |
| -import static org.junit.Assert.assertNotNull; |
21 |
| -import static org.junit.Assert.assertNull; |
22 |
| -import static org.junit.Assert.assertTrue; |
23 |
| -import static org.springframework.test.transaction.TransactionTestUtils.assertInTransaction; |
24 |
| -import static org.springframework.test.transaction.TransactionTestUtils.inTransaction; |
25 |
| - |
26 | 19 | import javax.annotation.Resource;
|
27 | 20 | import javax.sql.DataSource;
|
28 | 21 |
|
29 | 22 | import org.junit.After;
|
30 | 23 | import org.junit.Before;
|
31 | 24 | import org.junit.Test;
|
32 |
| -import org.springframework.tests.sample.beans.Employee; |
33 |
| -import org.springframework.tests.sample.beans.Pet; |
| 25 | + |
34 | 26 | import org.springframework.beans.factory.BeanNameAware;
|
35 | 27 | import org.springframework.beans.factory.InitializingBean;
|
36 | 28 | import org.springframework.beans.factory.annotation.Autowired;
|
37 |
| -import org.springframework.jdbc.BadSqlGrammarException; |
| 29 | +import org.springframework.dao.DataAccessException; |
38 | 30 | import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
39 | 31 | import org.springframework.test.annotation.NotTransactional;
|
40 | 32 | import org.springframework.test.context.ContextConfiguration;
|
41 | 33 | import org.springframework.test.context.transaction.AfterTransaction;
|
42 | 34 | import org.springframework.test.context.transaction.BeforeTransaction;
|
43 | 35 | import org.springframework.test.jdbc.SimpleJdbcTestUtils;
|
| 36 | +import org.springframework.tests.sample.beans.Employee; |
| 37 | +import org.springframework.tests.sample.beans.Pet; |
| 38 | + |
| 39 | +import static org.junit.Assert.*; |
| 40 | +import static org.springframework.test.transaction.TransactionTestUtils.*; |
44 | 41 |
|
45 | 42 | /**
|
46 | 43 | * Combined integration test for {@link AbstractJUnit4SpringContextTests} and
|
@@ -87,7 +84,7 @@ protected static void createPersonTable(final SimpleJdbcTemplate simpleJdbcTempl
|
87 | 84 | try {
|
88 | 85 | simpleJdbcTemplate.update("CREATE TABLE person (name VARCHAR(20) NOT NULL, PRIMARY KEY(name))");
|
89 | 86 | }
|
90 |
| - catch (final BadSqlGrammarException bsge) { |
| 87 | + catch (DataAccessException dae) { |
91 | 88 | /* ignore */
|
92 | 89 | }
|
93 | 90 | }
|
|
0 commit comments