Hello mooli tayer,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24691
to review the following change.
Change subject: tools: notifier: fix NotificationPropertiesTest.
......................................................................
tools: notifier: 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 <[email protected]>
---
M
backend/manager/tools/src/test/java/org/ovirt/engine/core/notifier/utils/NotificationPropertiesTest.java
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/91/24691/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..9e69c2a 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
@@ -6,15 +6,19 @@
import org.junit.BeforeClass;
import org.junit.Test;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+
public class NotificationPropertiesTest {
private static NotificationProperties prop = null;
@BeforeClass
- static public void beforeClass() {
+ static public void beforeClass() throws UnsupportedEncodingException {
+ NotificationProperties.release();
NotificationProperties.setDefaults(
- "src/test/resources/conf/notifier-prop-test.conf",
- "src/test/resources/conf/missing.conf"
+
URLDecoder.decode(ClassLoader.getSystemResource("conf/notifier-prop-test.conf").getPath(),
"UTF-8"),
+ ""
);
prop = NotificationProperties.getInstance();
assertNotNull(prop);
--
To view, visit http://gerrit.ovirt.org/24691
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3488856323577e3db6c779d86c190e064e15c97
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches