Skip to content

Instantly share code, notes, and snippets.

@htreu
Created December 4, 2017 07:53
Show Gist options
  • Save htreu/dd62e38c35aa88bef2cc9b52d0b993fe to your computer and use it in GitHub Desktop.
Save htreu/dd62e38c35aa88bef2cc9b52d0b993fe to your computer and use it in GitHub Desktop.
ConfigDispatcher Windows 10 Fix
From 4f5b378dbf320ee277c908723691abc0159bfa8f Mon Sep 17 00:00:00 2001
From: Henning Treu <henning.treu@telekom.de>
Date: Mon, 4 Dec 2017 08:48:59 +0100
Subject: [PATCH] Let the file watcher stop befor deleting the file
Signed-off-by: Henning Treu <henning.treu@telekom.de>
---
.../smarthome/config/dispatch/test/ConfigDispatcherOSGiTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bundles/config/org.eclipse.smarthome.config.dispatch.test/src/test/java/org/eclipse/smarthome/config/dispatch/test/ConfigDispatcherOSGiTest.java b/bundles/config/org.eclipse.smarthome.config.dispatch.test/src/test/java/org/eclipse/smarthome/config/dispatch/test/ConfigDispatcherOSGiTest.java
index 41ab8164f..b24e97718 100644
--- a/bundles/config/org.eclipse.smarthome.config.dispatch.test/src/test/java/org/eclipse/smarthome/config/dispatch/test/ConfigDispatcherOSGiTest.java
+++ b/bundles/config/org.eclipse.smarthome.config.dispatch.test/src/test/java/org/eclipse/smarthome/config/dispatch/test/ConfigDispatcherOSGiTest.java
@@ -566,7 +566,7 @@ public class ConfigDispatcherOSGiTest extends JavaOSGiTest {
}
@Test
- public void whenExclusiveConfigFileIsDeleted_shouldRemoveConfigFromConfigAdmin() throws IOException {
+ public void whenExclusiveConfigFileIsDeleted_shouldRemoveConfigFromConfigAdmin() throws Exception {
String configDirectory = configBaseDirectory + SEP + "exclusive_pid_configuration_removed_after_file_delete";
String servicesDirectory = "exclusive_pid_configuration_removed_after_file_delete_services";
@@ -582,6 +582,7 @@ public class ConfigDispatcherOSGiTest extends JavaOSGiTest {
verifyValueOfConfigurationProperty(pid, "property2", "value2");
context.disableComponent(CONFIG_DISPATCHER_COMPONENT_ID);
+ Thread.sleep(300);
// remember the file content and delete the file:
serviceConfigFile.delete();
--
2.13.6 (Apple Git-96)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment