-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RNET-1154, RNET-1151, RNET-1139: Compact-related fixes #3618
Conversation
/// <summary> | ||
/// A callback, invoked when opening a Realm for the first time during the life | ||
/// of a process to determine if it should be compacted before being returned | ||
/// to the user. | ||
/// </summary> | ||
/// <param name="totalBytes">Total file size (data + free space).</param> | ||
/// <param name="bytesUsed">Total data size.</param> | ||
/// <returns><c>true</c> to indicate that an attempt to compact the file should be made.</returns> | ||
/// <remarks>The compaction will be skipped if another process is accessing it.</remarks> | ||
public delegate bool ShouldCompactDelegate(ulong totalBytes, ulong bytesUsed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are moved to RealmConfigurationBase so they become available to sync configs.
@@ -321,50 +321,6 @@ public void RealmObjectClassesOnlyAllowRealmObjects() | |||
Assert.That(ex.Message, Does.Contain("must descend directly from either RealmObject, EmbeddedObject, or AsymmetricObject")); | |||
} | |||
|
|||
[TestCase(true)] | |||
[TestCase(false)] | |||
public void ShouldCompact_IsInvokedAfterOpening(bool shouldCompact) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is moved to SynchronizedInstanceTests
.
@@ -463,6 +419,32 @@ public void Compact_WhenResultsAreOpen_ShouldReturnFalse() | |||
token.Dispose(); | |||
} | |||
|
|||
[Test] | |||
public void Compact_WhenShouldDeleteIfMigrationNeeded_PreservesObjects() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Test Coverage Report for Build 9396984287Details
💛 - Coveralls |
Description
Fixes #3617
Fixes #3583
Fixes #3612
TODO