mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Let Liquibase smoke test pass on non-english systems
See gh-18873
This commit is contained in:
parent
c81cbb2e07
commit
83cb6f3c7f
@ -17,7 +17,10 @@
|
||||
package sample.liquibase;
|
||||
|
||||
import java.net.ConnectException;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
@ -31,6 +34,19 @@ public class SampleLiquibaseApplicationTests {
|
||||
@Rule
|
||||
public OutputCapture outputCapture = new OutputCapture();
|
||||
|
||||
private Locale defaultLocale;
|
||||
|
||||
@Before
|
||||
public void init() throws SecurityException {
|
||||
this.defaultLocale = Locale.getDefault();
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@After
|
||||
public void restoreLocale() {
|
||||
Locale.setDefault(this.defaultLocale);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultSettings() throws Exception {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user