Skip to content

Commit

Permalink
Update BAAS test server version
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Sep 7, 2023
1 parent e3b12ad commit d25f0f5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dependencies.list
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ MONGODB_REALM_SERVER=2023-05-15
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.withTimeout
import kotlinx.datetime.Instant
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
import kotlin.time.Duration.Companion.minutes

// Platform independent helper methods
object Utils {
Expand Down Expand Up @@ -92,7 +92,7 @@ fun Instant.toRealmInstant(): RealmInstant {
}

// Variant of `Channel.receiveOrFail()` that will will throw if a timeout is hit.
suspend fun <T : Any?> Channel<T>.receiveOrFail(timeout: Duration = 30.seconds): T {
suspend fun <T : Any?> Channel<T>.receiveOrFail(timeout: Duration = 1.minutes): T {
return withTimeout(timeout) {
receive()
}
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 @@ -192,7 +192,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 @@ -258,7 +261,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
)
}

// Test case for https://github.com/realm/realm-core/issues/5504
Expand All @@ -272,7 +278,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
)
}

@Test
Expand Down

0 comments on commit d25f0f5

Please sign in to comment.