mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
fixing test execution on german / windows machines
This commit is contained in:
@@ -58,6 +58,17 @@ public class I18nMessagesTest
|
|||||||
@Test
|
@Test
|
||||||
public void testI18n()
|
public void testI18n()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
lookup-order for this test:
|
||||||
|
- TM_en (es specified, but not ava)
|
||||||
|
- TM_<execution-locale>
|
||||||
|
- TM
|
||||||
|
|
||||||
|
This means that, if there is no default locale specified, this test accidentally passes on non-german machines, an fails on german machines, since the execution locale is de_DE, which is checked even before the fallback locale is considered.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Locale.setDefault(Locale.ENGLISH);
|
||||||
|
|
||||||
TestMessages msg = I18nMessages.get(TestMessages.class);
|
TestMessages msg = I18nMessages.get(TestMessages.class);
|
||||||
|
|
||||||
assertEquals("Normal Key", msg.normalKey);
|
assertEquals("Normal Key", msg.normalKey);
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ import static org.junit.Assert.*;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -155,7 +157,11 @@ public class AbstractTestBase
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
IOUtil.delete(tempDirectory);
|
try {
|
||||||
|
IOUtil.delete(tempDirectory);
|
||||||
|
} catch (IOException e) {
|
||||||
|
Logger.getGlobal().warning(String.format("deleting temp <%s> failed: %s", tempDirectory.getAbsolutePath(), e.getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user