commit | 9415544abdb600449ff03b300f3e13b816b05afa | [log] [tgz] |
---|---|---|
author | Hugo Arès <hugo.ares@ericsson.com> | Fri Nov 24 12:41:23 2017 -0500 |
committer | Hugo Arès <hugo.ares@ericsson.com> | Fri Nov 24 12:42:12 2017 -0500 |
tree | 1add4fe7f5339a4870215db8e8198c9563d6cfa8 | |
parent | e6cae07b6f8bfefc71068142f9bc9409a787f246 [diff] |
Fix failing configuration tests Ic8a1ca627 broke the tests. Setup the mock to have the same behavior as the real config which is to return an empty array instead of null for getStringList method. Change-Id: I52f62a15570a84f576fc99c114e1502fca9992c0
diff --git a/src/test/java/com/ericsson/gerrit/plugins/highavailability/ConfigurationTest.java b/src/test/java/com/ericsson/gerrit/plugins/highavailability/ConfigurationTest.java index 85dc137..e9b39c7 100644 --- a/src/test/java/com/ericsson/gerrit/plugins/highavailability/ConfigurationTest.java +++ b/src/test/java/com/ericsson/gerrit/plugins/highavailability/ConfigurationTest.java
@@ -108,6 +108,8 @@ .thenReturn(SHARED_DIRECTORY); when(configMock.getEnum(PEER_INFO_SECTION, null, STRATEGY_KEY, DEFAULT_PEER_INFO_STRATEGY)) .thenReturn(DEFAULT_PEER_INFO_STRATEGY); + when(configMock.getStringList(JGROUPS_SECTION, null, SKIP_INTERFACE_KEY)) + .thenReturn(new String[] {}); when(configMock.getStringList(CACHE_SECTION, null, PATTERN_KEY)) .thenReturn(CUSTOM_CACHE_PATTERNS); site = new SitePaths(SITE_PATH);