File tree 6 files changed +1101
-66
lines changed
tests/integration/timeline
6 files changed +1101
-66
lines changed Original file line number Diff line number Diff line change @@ -168,11 +168,10 @@ impl Room {
168
168
. add_initial_events (
169
169
self . inner . room . room_id ( ) ,
170
170
self . inner . sliding_sync_room . timeline_queue ( ) . iter ( ) . cloned ( ) . collect ( ) ,
171
+ self . inner . sliding_sync_room . prev_batch ( ) ,
171
172
)
172
173
. await ?;
173
174
174
- Ok ( Timeline :: builder ( & self . inner . room )
175
- . with_pagination_token ( self . inner . sliding_sync_room . prev_batch ( ) )
176
- . track_read_marker_and_receipts ( ) )
175
+ Ok ( Timeline :: builder ( & self . inner . room ) . track_read_marker_and_receipts ( ) )
177
176
}
178
177
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ use super::TestTimeline;
22
22
use crate :: timeline:: { inner:: HandleBackPaginatedEventsError , pagination:: PaginationTokens } ;
23
23
24
24
#[ async_test]
25
- async fn back_pagination_token_not_updated_with_empty_chunk ( ) {
25
+ async fn test_back_pagination_token_not_updated_with_empty_chunk ( ) {
26
26
let timeline = TestTimeline :: new ( ) ;
27
27
28
28
timeline
@@ -65,7 +65,7 @@ async fn back_pagination_token_not_updated_with_empty_chunk() {
65
65
}
66
66
67
67
#[ async_test]
68
- async fn back_pagination_token_not_updated_invalid_event ( ) {
68
+ async fn test_back_pagination_token_not_updated_invalid_event ( ) {
69
69
let timeline = TestTimeline :: new ( ) ;
70
70
71
71
// Invalid empty event.
Original file line number Diff line number Diff line change @@ -258,14 +258,14 @@ async fn timeline_test_helper(
258
258
// TODO: when the event cache handles its own cache, we can remove this.
259
259
client
260
260
. event_cache ( )
261
- . add_initial_events ( room_id, sliding_sync_room. timeline_queue ( ) . iter ( ) . cloned ( ) . collect ( ) )
261
+ . add_initial_events (
262
+ room_id,
263
+ sliding_sync_room. timeline_queue ( ) . iter ( ) . cloned ( ) . collect ( ) ,
264
+ sliding_sync_room. prev_batch ( ) ,
265
+ )
262
266
. await ?;
263
267
264
- let timeline = Timeline :: builder ( & sdk_room)
265
- . with_pagination_token ( sliding_sync_room. prev_batch ( ) )
266
- . track_read_marker_and_receipts ( )
267
- . build ( )
268
- . await ?;
268
+ let timeline = Timeline :: builder ( & sdk_room) . track_read_marker_and_receipts ( ) . build ( ) . await ?;
269
269
270
270
Ok ( timeline. subscribe ( ) . await )
271
271
}
You can’t perform that action at this time.
0 commit comments