mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 06:05:19 +00:00
Save server operations that were in the middle of being applied
Previously, if the test panicked before it had a chance to fully apply an operation, it would end up not being saved in the plan. With this commit we will mark the operation as applied before we start processing it, and mark it as not applied if, once we're done, we've found out that it couldn't be applied. This is consistent with what we do for client operations.
This commit is contained in:
parent
f995d07542
commit
4a61e2dfa4
1 changed files with 3 additions and 2 deletions
|
@ -121,6 +121,7 @@ async fn test_random_collaboration(
|
|||
|
||||
loop {
|
||||
let Some((next_operation, applied)) = plan.lock().next_server_operation(&clients) else { break };
|
||||
applied.store(true, SeqCst);
|
||||
let did_apply = apply_server_operation(
|
||||
deterministic.clone(),
|
||||
&mut server,
|
||||
|
@ -132,8 +133,8 @@ async fn test_random_collaboration(
|
|||
cx,
|
||||
)
|
||||
.await;
|
||||
if did_apply {
|
||||
applied.store(true, SeqCst);
|
||||
if !did_apply {
|
||||
applied.store(false, SeqCst);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue