From 93c6575bb4efd4744b54d800a9057f66b5687035 Mon Sep 17 00:00:00 2001 From: vempo Date: Wed, 24 Oct 2018 12:01:49 +0300 Subject: Removed config test with Thread.sleep The tests with Thread.sleep() caused a long build time (>7 min). Aslo fixed formatting, copyright headers, static analysis violations. Change-Id: I8279478c1e6812facc51730679d2ee4e73e22ec7 Issue-ID: SDC-1867 Signed-off-by: vempo --- .../org/onap/config/ConfigurationUtilsTest.java | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java') diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java index 707573640b..71b2a01c71 100644 --- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java @@ -1,16 +1,33 @@ +/* + * Copyright © 2016-2018 European Support Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.onap.config; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.List; - -import static org.junit.Assert.*; +import org.junit.Test; public class ConfigurationUtilsTest { @Test public void testCommaList() { - List list = Arrays.asList("1", "2", 3); + List list = Arrays.asList("1", "2", 3); String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list); list.forEach(o -> assertTrue(commaSeparatedList.contains(o.toString()))); } @@ -24,7 +41,7 @@ public class ConfigurationUtilsTest { @Test public void testGetArrayClassFunction() { - assertEquals(String[].class , ConfigurationUtils.getArrayClass(String.class)); + assertEquals(String[].class, ConfigurationUtils.getArrayClass(String.class)); assertNull(ConfigurationUtils.getArrayClass(ConfigurationUtilsTest.class)); } } \ No newline at end of file -- cgit 1.2.3-korg