diff options
author | 2018-04-29 18:34:48 +0300 | |
---|---|---|
committer | 2018-05-02 05:44:36 +0000 | |
commit | 7bfc8089071c675b2dcdf557a896ffe4cf6953b0 (patch) | |
tree | ab57f6cfdd75fdbc1afd0c1d728d5ec48b8f4ab3 /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java | |
parent | 332a0bd8fdb00136efddfb311b9ac1e256d82027 (diff) |
Added fallback for host address in logging
In some cases Java fails to get local hostname on Linux.
Added a workaround that in such cases gets at least some
meaningful host identification.
Change-Id: Icf9b84ec6a0d6fbcbcb6a1578689b3e3be00261b
Issue-ID: SDC-1275
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/context/HostAddressCacheTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/context/HostAddressCacheTest.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/context/HostAddressCacheTest.java index 6d7a636840..f75b634177 100644 --- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/context/HostAddressCacheTest.java +++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/context/HostAddressCacheTest.java @@ -16,7 +16,7 @@ package org.openecomp.sdc.logging.context; -import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; import java.net.InetAddress; import java.net.UnknownHostException; @@ -37,7 +37,7 @@ public class HostAddressCacheTest extends PowerMockTestCase { @Test public void hostAddressIsAlwaysPopulated() { - assertNotNull(new HostAddressCache().get()); + assertTrue(new HostAddressCache().get().isPresent()); } @Test |