Java Code Examples for org.springframework.test.jdbc.JdbcTestUtils#dropTables()
The following examples show how to use
org.springframework.test.jdbc.JdbcTestUtils#dropTables() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EmptyDatabaseIntegrationTest.java From embedded-database-spring-test with Apache License 2.0 | 4 votes |
@After public void tearDown() { JdbcTestUtils.dropTables(jdbcTemplate, "test.person"); }
Example 2
Source File: AbstractTransactionalTestNGSpringContextTests.java From spring-analysis-note with MIT License | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 3
Source File: AbstractTransactionalJUnit4SpringContextTests.java From spring-analysis-note with MIT License | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 4
Source File: AbstractTransactionalTestNGSpringContextTests.java From java-technology-stack with MIT License | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 5
Source File: AbstractTransactionalJUnit4SpringContextTests.java From java-technology-stack with MIT License | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 6
Source File: AbstractTransactionalTestNGSpringContextTests.java From spring4-understanding with Apache License 2.0 | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 7
Source File: AbstractTransactionalJUnit4SpringContextTests.java From spring4-understanding with Apache License 2.0 | 2 votes |
/** * Convenience method for dropping all of the specified tables. * <p>Use with caution outside of a transaction! * @param names the names of the tables to drop * @since 3.2 * @see JdbcTestUtils#dropTables */ protected void dropTables(String... names) { JdbcTestUtils.dropTables(this.jdbcTemplate, names); }
Example 8
Source File: SpringDataWithSecurityIntegrationTest.java From tutorials with MIT License | 2 votes |
/** * This is to ensure the tables are dropped in proper order. * After the Spring Boot 2.2.2 upgrade, DDL statements generated automatically try to drop Tweet table first. * As a result we get org.h2.jdbc.JdbcSQLSyntaxErrorException because Tweet_Likes table depends on Tweet. * * @see <a href="https://stackoverflow.com/questions/59364212/integrationtest-isolation-fails-in-springboot-2-2-2-release-error-dopping-table"> * StackOverflow#59364212 * </a> * @see <a href="https://stackoverflow.com/questions/59561551/hibernate-h2-specify-drop-table-order"> * StackOverflow#59561551 * </a> */ @After public void tearDown() { JdbcTemplate jdbcTemplate = ctx.getBean(JdbcTemplate.class); JdbcTestUtils.dropTables(jdbcTemplate, "Tweet_Likes", "Tweet"); }