summaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src/test/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-05-01 18:13:12 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-05-01 18:15:54 +0100
commit5ff419848b3fd04dba17ba9088c035848015fd4e (patch)
tree2808c5a9d453051286fa4ca8f6cb957fec82cd9a /ONAP-REST/src/test/java
parentb0c7e3bd5a3fa546c1f87298ca4312b728a25495 (diff)
Fix Test fail with variable length memory address
The unit test class PIPConfigurationTest.java has a test that checks a configuration string for length. However, the length of the "piptype" field in that string can vary, causing the test to intermittently fail. Field that passes: piptype=org.onap.policy.rest.jpa.PIPType@71b3bc45 Field that fails: piptype=org.onap.policy.rest.jpa.PIPType@a8c1f44 This fix removes the memory address from the "piptype" field, so that the configuration string will now always be 323 characters in length. Change-Id: Ib3640ec6f69ac7d691dcc989c44a7822bcc9b7f7 Issue-ID: POLICY-765 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'ONAP-REST/src/test/java')
-rw-r--r--ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PIPConfigurationTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PIPConfigurationTest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PIPConfigurationTest.java
index 8d87173b0..1a4c2756b 100644
--- a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PIPConfigurationTest.java
+++ b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PIPConfigurationTest.java
@@ -115,6 +115,7 @@ public class PIPConfigurationTest {
assertEquals(id, config.getName());
// Test toString
- assertEquals(332, config.toString().length());
+ String configString = config.toString().replaceAll("@[0-9a-f]*", "");
+ assertEquals(323, configString.length());
}
}