Skip to content

Commit

Permalink
Only delete after the Realm is closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Jun 16, 2023
1 parent f6eb3db commit f8a8838
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class RealmInMemoryTests {

@AfterTest
fun tearDown() {
PlatformUtils.deleteTempDir(tmpDir)
if (this::realm.isInitialized && !realm.isClosed()) {
realm.close()
}
PlatformUtils.deleteTempDir(tmpDir)
}

@Test
Expand Down

0 comments on commit f8a8838

Please sign in to comment.