Skip to content

Commit a38e6b4

Browse files
committed
Merge pull request #18873 from dreis2211
* pr/18873: Let Liquibase smoke test pass on non-english systems Closes gh-18873
2 parents c81cbb2 + 83cb6f3 commit a38e6b4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spring-boot-samples/spring-boot-sample-liquibase/src/test/java/sample/liquibase/SampleLiquibaseApplicationTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
package sample.liquibase;
1818

1919
import java.net.ConnectException;
20+
import java.util.Locale;
2021

22+
import org.junit.After;
23+
import org.junit.Before;
2124
import org.junit.Rule;
2225
import org.junit.Test;
2326

@@ -31,6 +34,19 @@ public class SampleLiquibaseApplicationTests {
3134
@Rule
3235
public OutputCapture outputCapture = new OutputCapture();
3336

37+
private Locale defaultLocale;
38+
39+
@Before
40+
public void init() throws SecurityException {
41+
this.defaultLocale = Locale.getDefault();
42+
Locale.setDefault(Locale.ENGLISH);
43+
}
44+
45+
@After
46+
public void restoreLocale() {
47+
Locale.setDefault(this.defaultLocale);
48+
}
49+
3450
@Test
3551
public void testDefaultSettings() throws Exception {
3652
try {

0 commit comments

Comments
 (0)