Skip to content

Commit

Permalink
Add timestamp to db filename to avoid collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Feb 22, 2024
1 parent 185e1f2 commit 8afe5e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ test('can make a MLS V3 client with encryption key and database path', async ()
if (!directoryExists) {
await RNFS.mkdir(dbDirPath)
}
const dbPath = `${dbDirPath}/myCoolApp.db3`
const timestamp = Date.now().toString()
const dbPath = `${dbDirPath}/myCoolApp${timestamp}.db3`

const key = new Uint8Array([
233, 120, 198, 96, 154, 65, 132, 17, 132, 96, 250, 40, 103, 35, 125, 64,
Expand Down Expand Up @@ -78,7 +79,6 @@ test('can make a MLS V3 client with encryption key and database path', async ()
(await clientFromBundle.conversations.listGroups()).length === 1,
`should have a group size of 1 but was ${(await clientFromBundle.conversations.listGroups()).length}`
)
RNFS.unlink(dbDirPath)
return true
})

Expand Down

0 comments on commit 8afe5e8

Please sign in to comment.