Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kfaraz committed Dec 5, 2023
1 parent 23c2939 commit ce41276
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,18 @@ public void testRemoveAuditLogsOlderThanWithEntryNotOlderThanTime() throws IOExc
@Test(timeout = 60_000L)
public void testFetchAuditHistoryByTypeWithLimit()
{
final AuditEvent entry1 = createAuditEvent("testKey", "testType", DateTimes.nowUtc());
final AuditEvent entry2 = createAuditEvent("testKey", "testType", DateTimes.nowUtc());
final AuditEvent entry3 = createAuditEvent("testKey", "testType", DateTimes.nowUtc());
final AuditEvent entry1 = createAuditEvent("testKey", "testType", DateTimes.of("2022-01"));
final AuditEvent entry2 = createAuditEvent("testKey", "testType", DateTimes.of("2022-03"));
final AuditEvent entry3 = createAuditEvent("testKey", "testType", DateTimes.of("2022-02"));

auditManager.doAudit(entry1);
auditManager.doAudit(entry2);
auditManager.doAudit(entry3);

List<AuditEvent> auditEntries = auditManager.fetchAuditHistory("testType", 2);
Assert.assertEquals(2, auditEntries.size());
Assert.assertEquals(entry1, auditEntries.get(0));
Assert.assertEquals(entry2, auditEntries.get(1));
Assert.assertEquals(entry2, auditEntries.get(0));
Assert.assertEquals(entry3, auditEntries.get(1));
}

@Test(expected = IllegalArgumentException.class, timeout = 10_000L)
Expand Down

0 comments on commit ce41276

Please sign in to comment.