Fix response size test 09/2109/2
authorSerban Jora <sj2381@att.com>
Tue, 19 Jun 2018 21:40:30 +0000 (17:40 -0400)
committerSerban Jora <sj2381@att.com>
Wed, 20 Jun 2018 13:49:14 +0000 (09:49 -0400)
Change-Id: I2560093efb78a88d11702b6f7f0d792cbcb0f768
Signed-off-by: Serban Jora <sj2381@att.com>
Issue-ID: ACUMOS-1180
Signed-off-by: Serban Jora <sj2381@att.com>
docs/release-notes.rst
gateway/pom.xml
gateway/src/main/java/org/acumos/federation/gateway/service/impl/PeerServiceImpl.java

index 3b9cba2..7f03148 100644 (file)
@@ -22,6 +22,11 @@ Release Notes
 
 The Federated Gateway server is available as a Docker image in a Docker registry.
 
+Version 1.1.4, 2018-06-20
+-------------------------
+
+* Fix result size test when retrieving 'self' peer
+
 Version 1.1.3, 2018-05-10
 -------------------------
 
index db5b63b..fce444f 100644 (file)
@@ -24,7 +24,7 @@ limitations under the License.
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.acumos.federation</groupId>
        <artifactId>gateway</artifactId>
-       <version>1.1.3-SNAPSHOT</version>
+       <version>1.1.4-SNAPSHOT</version>
        <name>Federation Gateway</name>
        <description>Federated Acumos Interface for inter-acumos and ONAP communication</description>
 
index d91762f..0d1a63e 100644 (file)
@@ -66,8 +66,8 @@ public class PeerServiceImpl extends AbstractServiceImpl implements PeerService
                RestPageResponse<MLPPeer> response = 
                        getClient().searchPeers(new MapBuilder().put("isSelf", Boolean.TRUE).build(), false, null);
                log.debug(EELFLoggerDelegate.errorLogger, "Peers representing 'self': " + response.getContent());
-               if (response.getSize() != 1) {
-                       log.warn(EELFLoggerDelegate.errorLogger, "Number of peers representing 'self' not 1: " + response.getSize());
+               if (response.getNumberOfElements() != 1) {
+                       log.warn(EELFLoggerDelegate.errorLogger, "Number of peers representing 'self' not 1. First page contains " + response.getNumberOfElements() + ".");
                        return null;
                }
                return response.getContent().get(0);