-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add geo types sync integration tests. #1533
Conversation
@@ -49,7 +49,7 @@ public class UserImpl( | |||
override val loggedIn: Boolean | |||
get() = RealmInterop.realm_user_is_logged_in(nativePointer) | |||
override val provider: AuthenticationProvider | |||
get() = AuthenticationProviderImpl.fromId(RealmInterop.realm_user_get_auth_provider(nativePointer)) | |||
get() = identities.first().provider |
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.
Talking to JS, we should deprecate this method as it doesn't really make sense anymore and instead point people towards user.identities
.
import kotlin.test.assertFails | ||
import kotlin.time.Duration.Companion.seconds | ||
|
||
private val GEO_SCHEMA = setOf(SyncRestaurant::class, Location::class) |
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.
We cannot use this anymore. All schemas need to be the same after the server introduced the new developer mode. I have a branch you can work from.
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.
See #1535
packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/GeoSpatialTests.kt
Outdated
Show resolved
Hide resolved
|
||
Realm.open(config).use { | ||
it.writeBlocking { | ||
assertFails { |
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.
I don't think the write will fail as long as the class is in the schema, instead you will probably see a compensating write?
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.
It fails with RLM_ERR_NO_SUBSCRIPTION_FOR_WRITE
. It is core preemptively catching the error.
packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/GeoSpatialTests.kt
Outdated
Show resolved
Hide resolved
packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/GeoSpatialTests.kt
Outdated
Show resolved
Hide resolved
packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/GeoSpatialTests.kt
Outdated
Show resolved
Hide resolved
packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/GeoSpatialTests.kt
Outdated
Show resolved
Hide resolved
51e0b87
to
05eca72
Compare
# Conflicts: # CHANGELOG.md # dependencies.list
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.
Add tests to validate we can define sync subscriptions using geo queries.