"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-jdbc/src/test/java/org/springframework/jdbc/datasource/init/AbstractDatabaseInitializationTests.java" between
spring-framework-5.3.7.tar.gz and spring-framework-5.3.8.tar.gz

About: Spring Framework is an application framework for the Java platform and .NET Framework. Community edition.

AbstractDatabaseInitializationTests.java  (spring-framework-5.3.7):AbstractDatabaseInitializationTests.java  (spring-framework-5.3.8)
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* https://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
skipping to change at line 38 skipping to change at line 38
import org.springframework.transaction.support.TransactionSynchronizationManager ; import org.springframework.transaction.support.TransactionSynchronizationManager ;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Abstract base class for integration tests involving database initialization. * Abstract base class for integration tests involving database initialization.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 4.0.3 * @since 4.0.3
*/ */
public abstract class AbstractDatabaseInitializationTests { abstract class AbstractDatabaseInitializationTests {
private final ClassRelativeResourceLoader resourceLoader = new ClassRelat iveResourceLoader(getClass()); private final ClassRelativeResourceLoader resourceLoader = new ClassRelat iveResourceLoader(getClass());
EmbeddedDatabase db; EmbeddedDatabase db;
JdbcTemplate jdbcTemplate; JdbcTemplate jdbcTemplate;
@BeforeEach @BeforeEach
public void setUp() { void setUp() {
db = new EmbeddedDatabaseBuilder().setType(getEmbeddedDatabaseTyp e()).build(); db = new EmbeddedDatabaseBuilder().setType(getEmbeddedDatabaseTyp e()).build();
jdbcTemplate = new JdbcTemplate(db); jdbcTemplate = new JdbcTemplate(db);
} }
@AfterEach @AfterEach
public void shutDown() { void shutDown() {
if (TransactionSynchronizationManager.isSynchronizationActive()) { if (TransactionSynchronizationManager.isSynchronizationActive()) {
TransactionSynchronizationManager.clear(); TransactionSynchronizationManager.clear();
TransactionSynchronizationManager.unbindResource(db); TransactionSynchronizationManager.unbindResource(db);
} }
db.shutdown(); db.shutdown();
} }
abstract EmbeddedDatabaseType getEmbeddedDatabaseType(); abstract EmbeddedDatabaseType getEmbeddedDatabaseType();
Resource resource(String path) { Resource resource(String path) {
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)