spring-test-dbunit/src/main/java/com/github/springtestdbunit/DbUnitRunner.java
public void afterTestMethod(DbUnitTestContext testContext) throws Exception {
		try {
			try {
				verifyExpected(testContext,
						getAnnotations(testContext, ExpectedDatabases.class, ExpectedDatabase.class));
			} finally {
				Collection<DatabaseTearDown> annotations = getAnnotations(testContext, DatabaseTearDowns.class,
						DatabaseTearDown.class);
				try {
					setupOrTeardown(testContext, false, AnnotationAttributes.get(annotations));
				} catch (RuntimeException ex) {
					if (testContext.getTestException() == null) {
						throw ex;
					}
					if (logger.isWarnEnabled()) {
						logger.warn("Unable to throw database cleanup exception due to existing test error", ex);
					}
				}
			}
		} finally {
			testContext.getConnections().closeAll();
		}
	}
/**
	 * Called after a test method is executed to perform any database teardown and to check expected results.
	 * @param testContext The test context
	 * @throws Exception
	 */
Called after a test method is executed to perform any database teardown and to check expected results.
@param testContext The test context
@throws Exception
Called after a test method is executed to perform any database teardown and to check expected results . @param testContext The test context @throws Exception
public void afterTestMethod(DbUnitTestContext testContext) throws Exception {
		try {
			try {
				verifyExpected(testContext,
						getAnnotations(testContext, ExpectedDatabases.class, ExpectedDatabase.class));
			} finally {
				Collection<DatabaseTearDown> annotations = getAnnotations(testContext, DatabaseTearDowns.class,
						DatabaseTearDown.class);
				try {
					setupOrTeardown(testContext, false, AnnotationAttributes.get(annotations));
				} catch (RuntimeException ex) {
					if (testContext.getTestException() == null) {
						throw ex;
					}
					if (logger.isWarnEnabled()) {
						logger.warn("Unable to throw database cleanup exception due to existing test error", ex);
					}
				}
			}
		} finally {
			testContext.getConnections().closeAll();
		}
	}
public void afterTestMethod ( DbUnitTestContext testContext ) throws Exception { try { try { verifyExpected ( testContext , getAnnotations ( testContext , ExpectedDatabases . class , ExpectedDatabase . class ) ) ; } finally { Collection < DatabaseTearDown > annotations = getAnnotations ( testContext , DatabaseTearDowns . class , DatabaseTearDown . class ) ; try { setupOrTeardown ( testContext , false , AnnotationAttributes . get ( annotations ) ) ; } catch ( RuntimeException ex ) { if ( testContext . getTestException ( ) == null ) { throw ex ; } if ( logger . isWarnEnabled ( ) ) { logger . warn ( "Unable to throw database cleanup exception due to existing test error" , ex ) ; } } } } finally { testContext . getConnections ( ) . closeAll ( ) ; } }
Called after a test method is executed to perform any database teardown and to check expected results.
Called after a test method is executed to perform any database teardown and to check expected results .