Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Wait until locale has been set before running the test (#4030)
Browse files Browse the repository at this point in the history
Fixes #4010

Signed-off-by: Stefan Triller <stefan.triller@telekom.de>
  • Loading branch information
triller-telekom authored and kaikreuzer committed Aug 11, 2017
1 parent c85096e commit 0d5df8e
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -13,6 +13,7 @@ import static org.junit.matchers.JUnitMatchers.*

import org.eclipse.smarthome.core.binding.BindingInfo
import org.eclipse.smarthome.core.binding.BindingInfoRegistry
import org.eclipse.smarthome.core.i18n.LocaleProvider
import org.eclipse.smarthome.test.OSGiTest
import org.eclipse.smarthome.test.SyntheticBundleInstaller
import org.junit.After
Expand Down Expand Up @@ -109,6 +110,12 @@ class BindingInfoI18nTest extends OSGiTest {
localeCfg.put("country", "DE");
config.update(localeCfg);

//before running the test with a default locale make sure the locale has been set
LocaleProvider localeProvider = getService(LocaleProvider.class);
waitForAssert {
assertThat localeProvider.getLocale().toString(), is("de")
}

def bundleContext = getBundleContext()
def initialNumberOfBindingInfos = bindingInfoRegistry.getBindingInfos().size()

Expand Down

0 comments on commit 0d5df8e

Please sign in to comment.