diff options
Diffstat (limited to 'sdnr/wt/common/src/test/java')
2 files changed, 36 insertions, 36 deletions
diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java index f6f741197..591ea49dd 100644 --- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java +++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java @@ -197,7 +197,7 @@ public class TestConfig { try { Thread.sleep(2000); } catch (InterruptedException e) { - Thread.interrupted(); + Thread.currentThread().interrupt(); } this.write(TESTFILENAME, TESTCONTENT1); int i=10; @@ -205,7 +205,7 @@ public class TestConfig { try { Thread.sleep(1000); } catch (InterruptedException e) { - Thread.interrupted(); + Thread.currentThread().interrupt(); } if(changeFlag) { break; diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPomfile.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPomfile.java index 49e0445a1..02233aff4 100644 --- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPomfile.java +++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPomfile.java @@ -33,38 +33,38 @@ import org.xml.sax.SAXException; public class TestPomfile { - private static final String TESTPROPERTY_KEY="elasticsearch.version"; - private static final String TESTPROPERTY_VALUE = "6.4.3"; - private static final String POMFILENAME = "pom.xml"; - private static final String POM_PROPERTY = "#Generated by org.apache.felix.bundleplugin\n" + - "#Tue Nov 19 11:20:33 CET 2019\n" + - "version=0.7.0-SNAPSHOT\n" + - "groupId=org.onap.ccsdk.features.sdnr.wt\n" + - "artifactId=sdnr-wt-data-provider-provider\n"; - //private static final Date DATE_EXPECTED = new Date(119, 10, 19, 11, 20, 33); - - @Test - public void test() { - PomFile pom=null; - try { - pom = new PomFile(new FileInputStream(POMFILENAME)); - } catch (ParserConfigurationException | SAXException | IOException e) { - fail(e.getMessage()); - } - assertNotNull(pom); - assertEquals(TESTPROPERTY_VALUE, pom.getProperty(TESTPROPERTY_KEY)); - - } - @Test - public void testProp() { - PomPropertiesFile file = null; - try { - file = new PomPropertiesFile(new ByteArrayInputStream(POM_PROPERTY.getBytes())); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - assertNotNull(file); - assertNotNull(file.getBuildDate()); - } + private static final String TESTPROPERTY_KEY="elasticsearch-rest-client.version"; + private static final String TESTPROPERTY_VALUE = "6.4.3"; + private static final String POMFILENAME = "pom.xml"; + private static final String POM_PROPERTY = "#Generated by org.apache.felix.bundleplugin\n" + + "#Tue Nov 19 11:20:33 CET 2019\n" + + "version=0.7.0-SNAPSHOT\n" + + "groupId=org.onap.ccsdk.features.sdnr.wt\n" + + "artifactId=sdnr-wt-data-provider-provider\n"; + //private static final Date DATE_EXPECTED = new Date(119, 10, 19, 11, 20, 33); + + @Test + public void test() { + PomFile pom=null; + try { + pom = new PomFile(new FileInputStream(POMFILENAME)); + } catch (ParserConfigurationException | SAXException | IOException e) { + fail(e.getMessage()); + } + assertNotNull(pom); + assertEquals(TESTPROPERTY_VALUE, pom.getProperty(TESTPROPERTY_KEY)); + + } + @Test + public void testProp() { + PomPropertiesFile file = null; + try { + file = new PomPropertiesFile(new ByteArrayInputStream(POM_PROPERTY.getBytes())); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + assertNotNull(file); + assertNotNull(file.getBuildDate()); + } } |