mooli tayer has uploaded a new change for review.

Change subject: tools: fix NotificationPropertiesTest.
......................................................................

tools: fix NotificationPropertiesTest.

Call NotificationProperties.release() so we do not
get a stale copy of Notification Properties.

(Set default and get instance are not enough
if the current class loader has a copy of
NotificationProperties with an old instance
we will get that one!)

also enable NotificationPropertiesTest to run both under maven and straight
from source thus speeding up testing during development.

Change-Id: Ia3488856323577e3db6c779d86c190e064e15c97
Signed-off-by: Mooli Tayer <mta...@redhat.com>
---
M 
backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/24387/1

diff --git 
a/backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
 
b/backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
index b04ce7d..98708fd 100644
--- 
a/backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
+++ 
b/backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
@@ -12,9 +12,10 @@
 
     @BeforeClass
     static public void beforeClass() {
+        NotificationProperties.release();
         NotificationProperties.setDefaults(
-            "src/test/resources/conf/notifier-prop-test.conf",
-            "src/test/resources/conf/missing.conf"
+                
ClassLoader.getSystemResource("conf/notifier-prop-test.conf").getPath(),
+                ""
         );
         prop = NotificationProperties.getInstance();
         assertNotNull(prop);


-- 
To view, visit http://gerrit.ovirt.org/24387
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3488856323577e3db6c779d86c190e064e15c97
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mta...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to