From a50bcd210af491983045cad530c00b2d197063b0 Mon Sep 17 00:00:00 2001 From: Strongest Number 9 <16169054+StrongestNumber9@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:37:03 +0300 Subject: [PATCH] Updates 946677600 epoch to 946720800 (+86400/2) in tests (#82) --- .../walker/conditions/LatestConditionTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java index 57b5c7c3..7937abc3 100644 --- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java +++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java @@ -63,20 +63,20 @@ void conditionTest() { @Test void conditionUpdatedTest() { String e = "(\n" + " \"journaldb\".\"logfile\".\"logdate\" <= date '2000-01-01'\n" - + " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 946677600)\n" + + " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 946720800)\n" + ")"; - Condition elementCondition = new LatestCondition("946677600").condition(); + Condition elementCondition = new LatestCondition("946720800").condition(); Assertions.assertEquals(e, elementCondition.toString()); } @Test void equalsTest() { - IndexCondition eq1 = new IndexCondition("946677600", "EQUALS", false); + IndexCondition eq1 = new IndexCondition("946720800", "EQUALS", false); eq1.condition(); - IndexCondition eq2 = new IndexCondition("946677600", "EQUALS", false); - IndexCondition eq3 = new IndexCondition("946677600", "EQUALS", true); + IndexCondition eq2 = new IndexCondition("946720800", "EQUALS", false); + IndexCondition eq3 = new IndexCondition("946720800", "EQUALS", true); eq3.condition(); - IndexCondition eq4 = new IndexCondition("946677600", "EQUALS", true); + IndexCondition eq4 = new IndexCondition("946720800", "EQUALS", true); Assertions.assertEquals(eq1, eq2); Assertions.assertEquals(eq2, eq1); Assertions.assertEquals(eq3, eq4); @@ -84,9 +84,9 @@ void equalsTest() { @Test void notEqualsTest() { - IndexCondition eq1 = new IndexCondition("946677600", "EQUALS", false); + IndexCondition eq1 = new IndexCondition("946720800", "EQUALS", false); IndexCondition notEq = new IndexCondition("1000", "EQUALS", false); - IndexCondition notEq2 = new IndexCondition("946677600", "EQUALS", true); + IndexCondition notEq2 = new IndexCondition("946720800", "EQUALS", true); Assertions.assertNotEquals(eq1, notEq); Assertions.assertNotEquals(notEq, eq1); Assertions.assertNotEquals(eq1, null);