You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: enhance duplicate validation with modular testcase logic (#4)
- Refactor verify_duplicate_testcase into organized duplicate_test module
- Add comprehensive timestamp-based duplicate correctness validation
- Improve test output formatting with clear PASSED/FILTERED status
- Enhance error messages for better debugging of test failures
- Add detailed debug output for duplicate detection timing validation
The test infrastructure now provides precise validation of which duplicate
was kept during deduplication, making it easier to catch Lambda bugs
where wrong duplicates are retained instead of "last occurrence wins".
TestCase{entity_id:"more_than_7_days_ago_fail",next_offset:20,last_offset: -7,priority:Priority::Urgent,should_pass:false,description:"Tests 'more than 7 days ago' rule (should fail)"},
45
-
TestCase{entity_id:"more_than_7_days_ago_pass",next_offset:20,last_offset: -8,priority:Priority::Urgent,should_pass:true,description:"Tests 'more than 7 days ago' rule (should pass)"},
46
-
TestCase{entity_id:"more_than_7_days_ago_pass_2",next_offset:25,last_offset: -10,priority:Priority::Urgent,should_pass:true,description:"Tests 'more than 7 days ago' rule (should pass)"},
TestCase{entity_id:DUP_TEST_ID,next_offset:30,last_offset: -10,priority:Priority::Urgent,should_pass:false,description:"Rule: deduplication (first occurrence, expected to be FILTERED)"},
45
+
TestCase{entity_id:DUP_TEST_ID,next_offset:35,last_offset: -15,priority:Priority::Normal,should_pass:true,description:"Rule: deduplication (last occurrence wins, expected to be PASSED)"},
46
+
TestCase{entity_id:"more_than_7_days_ago_fail",next_offset:20,last_offset: -7,priority:Priority::Urgent,should_pass:false,description:"Rule: more than 7 days ago (fail <7)"},
47
+
TestCase{entity_id:"more_than_7_days_ago_pass",next_offset:20,last_offset: -8,priority:Priority::Urgent,should_pass:true,description:"Rule: more than 7 days ago (pass =7)"},
48
+
TestCase{entity_id:"more_than_7_days_ago_pass_2",next_offset:25,last_offset: -10,priority:Priority::Urgent,should_pass:true,description:"Rule: more than 7 days ago (pass >7)"},
49
+
TestCase{entity_id:"within_90_days_fail",next_offset:91,last_offset: -30,priority:Priority::Normal,should_pass:false,description:"Rule: within 90 days (fail >90)"},
50
+
TestCase{entity_id:"within_90_days_pass",next_offset:90,last_offset: -30,priority:Priority::Normal,should_pass:true,description:"Rule: within 90 days (pass =90)"},
51
+
TestCase{entity_id:"within_90_days_pass_2",next_offset:89,last_offset: -20,priority:Priority::Normal,should_pass:true,description:"Rule: within 90 days (pass <90)"},
0 commit comments