Fix test case broken by new GSON version 18/126618/1
authorliamfallon <liam.fallon@est.tech>
Mon, 17 Jan 2022 18:21:48 +0000 (18:21 +0000)
committerliamfallon <liam.fallon@est.tech>
Mon, 17 Jan 2022 18:22:14 +0000 (18:22 +0000)
The "com/google" resource bundle now contains more than 189 files, so
this test is changed to insetead check for the existence of
"com/google/gson", otherwise this test could break every time we update
gson.

Issue-ID: POLICY-3849
Change-Id: Id979bb7a3d2453956701f64057accb08228a774d
Signed-off-by: liamfallon <liam.fallon@est.tech>
utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java

index d78d909..8b40816 100644 (file)
@@ -312,7 +312,7 @@ public class ResourceUtilsTest {
                         normalizePath(resultD2.iterator().next()));
 
         Set<String> resultJ0 = ResourceUtils.getDirectoryContents("com");
-        assertEquals(189, resultJ0.size());
+        assertTrue(resultJ0.contains("com/google/gson/"));
         assertEquals("com/google/", normalizePath(resultJ0.iterator().next()));
 
         Set<String> resultJ1 = ResourceUtils.getDirectoryContents("com/google/gson");