Skip to content

Commit

Permalink
Merge branch 'feature/github-actions' into cm/sync-tests
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/SubscriptionSetTests.kt
  • Loading branch information
Christian Melchior committed Sep 8, 2023
2 parents fc5ddf2 + aa19b3c commit 5e4c699
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 13 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@
* None.


## 1.11.1 (2023-09-07)

### Enhancements
* None.

### Fixed
* Opening a Realm would crash with `No built-in scheduler implementation for this platform` on Linux (JVM) and Windows. (Issue [#1502](https://github.com/realm/realm-kotlin/issues/1502), since 1.11.0)

### Compatibility
* File format: Generates Realms with file format v23.
* Realm Studio 13.0.0 or above is required to open Realms created by this version.
* This release is compatible with the following Kotlin releases:
* Kotlin 1.8.0 and above. The K2 compiler is not supported yet.
* Ktor 2.1.2 and above.
* Coroutines 1.7.0 and above.
* AtomicFu 0.18.3 and above.
* The new memory model only. See https://github.com/realm/realm-kotlin#kotlin-memory-model-and-coroutine-compatibility
* Minimum Kbson 0.3.0.
* Minimum Gradle version: 6.8.3.
* Minimum Android Gradle Plugin version: 4.1.3.
* Minimum Android SDK: 16.

### Internal
* None.


## 1.11.0 (2023-09-01)

### Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions dependencies.list
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Version of MongoDB Realm used by integration tests
# See https://github.com/realm/ci/packages/147854 for available versions
MONGODB_REALM_SERVER=2023-05-15
MONGODB_REALM_SERVER=2023-09-07

# `BAAS` and `BAAS-UI` projects commit hashes matching MONGODB_REALM_SERVER image version
# note that the MONGODB_REALM_SERVER image is a nightly build, find the matching commits
# for that date within the following repositories:
# https://github.com/10gen/baas/
# https://github.com/10gen/baas-ui/
REALM_BAAS_GIT_HASH=92fc646871b507c73e48cc05ebec54fc9a134ae7
REALM_BAAS_UI_GIT_HASH=67ad3606ec1137640ea84dcfe7a1a1b29aa7508f
REALM_BAAS_GIT_HASH=fc070ea7e874f58eb5b4f7a9d344fa7cdd755817
REALM_BAAS_UI_GIT_HASH=ca722f5bb7a7485404a68874991ba8e50787ea9a
4 changes: 2 additions & 2 deletions packages/jni-swig-stub/src/main/jni/realm_api_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,6 @@ realm_sync_thread_error(realm_userdata_t userdata, const char* error) {
}

realm_scheduler_t*
realm_create_generic_scheduler() {
return new realm_scheduler_t{realm::util::Scheduler::make_generic()};
realm_create_generic_scheduler() {
return new realm_scheduler_t { realm::util::Scheduler::make_dummy() };
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ package io.realm.kotlin.types.annotations
*
* The full-text index currently support this set of features:
*
* - Only token or word search, e.g. `bio TEXT 'computer dancing'` will find all objects that
* - Token or word search, e.g. `bio TEXT 'computer dancing'` will find all objects that
* contains the words `computer` and `dancing` in their `bio` property.
* - Tokens are diacritics- and case-insensitive, e.g.`bio TEXT 'cafe dancing'` and
* `bio TEXT 'café DANCING'` will return the same set of matches.
* - Token prefix search can be done using `*`, like `bio TEXT comp*`.
* - Ignoring results with certain tokens are done using `-`, e.g. `bio TEXT 'computer -dancing'`
* will find all objects that contain `computer` but not `dancing`.
* - Tokens are defined by a simple tokenizer that uses the following rules:
Expand All @@ -29,7 +30,7 @@ package io.realm.kotlin.types.annotations
*
* Note the following constraints before using full-text search:
*
* - Token prefix or suffix search like `bio TEXT 'comp* *cing'` is not supported.
* - Token suffix search like `bio TEXT '*cing'` is not supported.
* - Only ASCII and Latin-1 alphanumerical chars are included in the index (most western languages).
* - Only boolean match is supported, i.e. "found" or "not found". It is not possible to sort
* results by "relevance" .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class FlexibleSyncIntegrationTests {
.query("(name = 'red' OR name = 'blue')")
add(query, "sub")
}
assertTrue(realm.subscriptions.waitForSynchronization(60.seconds))
assertTrue(realm.subscriptions.waitForSynchronization(120.seconds))
realm.write {
copyToRealm(FlexParentObject(randomSection).apply { name = "red" })
copyToRealm(FlexParentObject(randomSection).apply { name = "blue" })
Expand All @@ -156,7 +156,7 @@ class FlexibleSyncIntegrationTests {
val query = realm.query<FlexParentObject>("section = $0 AND name = 'red'", randomSection)
add(query, "sub", updateExisting = true)
}
assertTrue(realm.subscriptions.waitForSynchronization(60.seconds))
assertTrue(realm.subscriptions.waitForSynchronization(120.seconds))
assertEquals(1, realm.query<FlexParentObject>().count().find())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ class FunctionsTests {
runBlocking {
anonUser.logOut()
}
assertFailsWithMessage<ServiceException>("[Service][Unknown(4351)] expected Authorization header with JWT") {
assertFailsWithMessage<ServiceException>("[Service][Unknown(4351)] unauthorized") {
runBlocking {
functions.call(FIRST_ARG_FUNCTION.name, 1, 2, 3)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ class SubscriptionSetTests {
assertFailsWith<BadFlexibleSyncQueryException> {
subscriptions.waitForSynchronization()
}
assertTrue(subscriptions.errorMessage!!.contains("Client provided query with bad syntax"))
assertTrue(
subscriptions.errorMessage!!.contains("Invalid query: invalid RQL for table \"FlexParentObject\": syntax error: unexpected Limit, expecting Or or RightParenthesis"),
subscriptions.errorMessage
)
subscriptions.update {
removeAll()
}
Expand Down Expand Up @@ -273,7 +276,10 @@ class SubscriptionSetTests {
updatedSubs.waitForSynchronization()
}
assertEquals(SubscriptionSetState.ERROR, updatedSubs.state)
assertTrue(updatedSubs.errorMessage!!.contains("Client provided query with bad syntax"))
assertTrue(
updatedSubs.errorMessage!!.contains("Invalid query: invalid RQL for table \"FlexParentObject\": syntax error: unexpected Limit, expecting Or or RightParenthesis"),
updatedSubs.errorMessage
)
subscriptions.close()
}

Expand All @@ -289,7 +295,10 @@ class SubscriptionSetTests {
}
assertEquals(SubscriptionSetState.ERROR, updatedSubs.state)
assertEquals("TRUEPREDICATE and TRUEPREDICATE LIMIT(1)", updatedSubs.first().queryDescription)
assertTrue(updatedSubs.errorMessage!!.contains("Client provided query with bad syntax"))
assertTrue(
updatedSubs.errorMessage!!.contains("Invalid query: invalid RQL for table \"FlexParentObject\": syntax error: unexpected Limit, expecting Or or RightParenthesis"),
updatedSubs.errorMessage
)
subscriptions.close()
}

Expand Down

0 comments on commit 5e4c699

Please sign in to comment.