Fix tests
This commit is contained in:
parent
ea4e67fb76
commit
e6087e0ed9
2 changed files with 10 additions and 9 deletions
|
@ -436,10 +436,7 @@ async fn test_channel_buffer_disconnect(
|
||||||
|
|
||||||
// Channel buffer observed the deletion
|
// Channel buffer observed the deletion
|
||||||
channel_buffer_b.update(cx_b, |buffer, cx| {
|
channel_buffer_b.update(cx_b, |buffer, cx| {
|
||||||
assert_eq!(
|
assert!(buffer.channel(cx).is_none());
|
||||||
buffer.channel(cx).unwrap().as_ref(),
|
|
||||||
&channel(channel_id, "the-channel", proto::ChannelRole::Member)
|
|
||||||
);
|
|
||||||
assert!(!buffer.is_connected());
|
assert!(!buffer.is_connected());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
|
db::{self, UserId},
|
||||||
rpc::RECONNECT_TIMEOUT,
|
rpc::RECONNECT_TIMEOUT,
|
||||||
tests::{room_participants, RoomParticipants, TestServer},
|
tests::{room_participants, RoomParticipants, TestServer},
|
||||||
};
|
};
|
||||||
|
@ -292,11 +293,14 @@ async fn test_core_channels(
|
||||||
server.disconnect_client(client_a.peer_id().unwrap());
|
server.disconnect_client(client_a.peer_id().unwrap());
|
||||||
deterministic.advance_clock(RECEIVE_TIMEOUT + RECONNECT_TIMEOUT);
|
deterministic.advance_clock(RECEIVE_TIMEOUT + RECONNECT_TIMEOUT);
|
||||||
|
|
||||||
client_b
|
server
|
||||||
.channel_store()
|
.app_state
|
||||||
.update(cx_b, |channel_store, cx| {
|
.db
|
||||||
channel_store.rename(channel_a_id, "channel-a-renamed", cx)
|
.rename_channel(
|
||||||
})
|
db::ChannelId::from_proto(channel_a_id),
|
||||||
|
UserId::from_proto(client_a.id()),
|
||||||
|
"channel-a-renamed",
|
||||||
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue