Skip to content

Commit

Permalink
try another numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Aug 6, 2024
1 parent 79d5264 commit 7b89ef3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/integration/logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ describe('LogDatabase CRUD', () => {
// Trigger a log event which should be saved in the database
logger.log(newLogEntry.level, newLogEntry.message)
// Wait for the log to be written to the database
await new Promise((resolve) => setTimeout(resolve, 500)) // Delay to allow log to be processed
await new Promise((resolve) => setTimeout(resolve, 1000)) // Delay to allow log to be processed

// Define the time frame for the log retrieval
const startTime = new Date(Date.now() - 2500) // 2.5 seconds ago
const startTime = new Date(Date.now() - 5000) // 5 seconds ago
const endTime = new Date() // current time

// Retrieve the latest log entries
let logs = await database.logs.retrieveMultipleLogs(startTime, endTime, 300)
let logs = await database.logs.retrieveMultipleLogs(startTime, endTime, 500)
logs = logs.filter((log) => log.message === newLogEntry.message)

expect(logs?.length).to.equal(1)
Expand Down

0 comments on commit 7b89ef3

Please sign in to comment.