Skip to content

Commit f2787d8

Browse files
committed
fix up the is active test
1 parent 18f4149 commit f2787d8

File tree

2 files changed

+7
-2
lines changed
  • library/src

2 files changed

+7
-2
lines changed

library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt

+6-2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,13 @@ class GroupTest {
121121
caro.walletAddress
122122
)
123123
)
124+
runBlocking { caroClient.conversations.syncGroups() }
125+
val caroGroup = caroClient.conversations.listGroups().first()
126+
assert(caroGroup.isActive())
124127
assert(group.isActive())
125-
group.removeMembers(listOf(bo.walletAddress))
126-
assert(!group.isActive())
128+
group.removeMembers(listOf(caro.walletAddress))
129+
assert(group.isActive())
130+
assert(!caroGroup.isActive())
127131
}
128132

129133
@Test

library/src/main/java/org/xmtp/android/library/Group.kt

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class Group(val client: Client, private val libXMTPGroup: FfiGroup) {
129129
}
130130

131131
fun isActive(): Boolean {
132+
runBlocking { libXMTPGroup.sync() }
132133
return libXMTPGroup.isActive()
133134
}
134135

0 commit comments

Comments
 (0)