Fix a test flake involving zeroed out group_intervals (#20328)

Release Notes:

- N/A
This commit is contained in:
Will Bradley 2024-11-07 09:17:43 -07:00 committed by GitHub
parent 454c9dc06d
commit de70852497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 7 deletions

View file

@ -169,8 +169,12 @@ fn test_undo_redo_with_selection_restoration(cx: &mut TestAppContext) {
init_test(cx, |_| {});
let mut now = Instant::now();
let buffer = cx.new_model(|cx| language::Buffer::local("123456", cx));
let group_interval = buffer.update(cx, |buffer, _| buffer.transaction_group_interval());
let group_interval = Duration::from_millis(1);
let buffer = cx.new_model(|cx| {
let mut buf = language::Buffer::local("123456", cx);
buf.set_group_interval(group_interval);
buf
});
let buffer = cx.new_model(|cx| MultiBuffer::singleton(buffer, cx));
let editor = cx.add_window(|cx| build_editor(buffer.clone(), cx));