summaryrefslogtreecommitdiffstats
path: root/LogParser/src/test
diff options
context:
space:
mode:
authorcookiewang <gw1218@att.com>2017-08-30 09:43:50 -0500
committercookiewang <gw1218@att.com>2017-08-30 09:44:17 -0500
commitb5c606476cd4768d98ac616e97c4af992920312c (patch)
tree86ceba0314d2a8ca19905a4bc50f5cad966991c9 /LogParser/src/test
parented3acdbb2d22e819218eea730932950d69d985fe (diff)
Add a new cleanup process
Created a new cleanup process to delete all the old data from SystemLogDB table Issue-ID:POLICY-193 Change-Id: Id17539e68ac70be20857b071ffb3700a85bcb817 Signed-off-by: cookiewang <gw1218@att.com>
Diffstat (limited to 'LogParser/src/test')
-rw-r--r--LogParser/src/test/java/org/onap/xacml/parser/ParseLogTest.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/LogParser/src/test/java/org/onap/xacml/parser/ParseLogTest.java b/LogParser/src/test/java/org/onap/xacml/parser/ParseLogTest.java
index 3cf3d188f..b02a1435d 100644
--- a/LogParser/src/test/java/org/onap/xacml/parser/ParseLogTest.java
+++ b/LogParser/src/test/java/org/onap/xacml/parser/ParseLogTest.java
@@ -161,26 +161,13 @@ public class ParseLogTest {
}
@Test
- public void testParseDateFail(){
-
- logger.debug("testParseDateFail: enter");
-
- String line = "2016-02-23 08:07:30";
- Date returnValue = ParseLog.parseDate(line, "yyyy-MM-dd HH:mm:ss", true);
- logger.debug("testParseDateFail: returnValue: " + returnValue);
- assertEquals(null, returnValue);
-
- logger.debug("testParseDateFail: exit");
- }
-
- @Test
public void testPullLastLineRead(){
logger.debug("testPullLastLineRead: enter");
File file = new File(testFile1);
String returnValue = null;
try {
- returnValue = ParseLog.PullLastLineRead(file, "pap-rest.log");
+ returnValue = ParseLog.pullLastLineRead(file, "pap-rest.log");
logger.debug("testPullLastLineRead: returnValue for pap-rest.log: " + returnValue);
} catch (IOException e) {
fail();
@@ -188,7 +175,7 @@ public class ParseLogTest {
assertEquals("52", returnValue);
try {
- returnValue = ParseLog.PullLastLineRead(file, "debug.log");
+ returnValue = ParseLog.pullLastLineRead(file, "debug.log");
logger.debug("testPullLastLineRead: returnValue for debug.log: " + returnValue);
} catch (IOException e) {
fail();
@@ -196,7 +183,7 @@ public class ParseLogTest {
assertEquals("17", returnValue);
try {
- returnValue = ParseLog.PullLastLineRead(file, "error.log");
+ returnValue = ParseLog.pullLastLineRead(file, "error.log");
logger.debug("testPullLastLineRead: returnValue for error.log: " + returnValue);
} catch (IOException e) {
fail();
@@ -213,7 +200,7 @@ public class ParseLogTest {
File file = new File("nonExistFile.txt");
try {
- assertEquals(null, ParseLog.PullLastLineRead(file, "pap-rest"));
+ assertEquals(null, ParseLog.pullLastLineRead(file, "pap-rest"));
} catch (IOException e) {
fail();
}
@@ -228,7 +215,7 @@ public class ParseLogTest {
File file = new File(testFile2);
try {
- assertEquals(null, ParseLog.PullLastLineRead(file, "pap-rest"));
+ assertEquals(null, ParseLog.pullLastLineRead(file, "pap-rest"));
} catch (IOException e) {
fail();
}