mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 07:52:19 +03:00
WIP: failing randomized test
SEED=175 MAX_PEERS=2 ITERATIONS=1 OPERATIONS=159 cargo test --package=collab random -- --nocapture
This commit is contained in:
parent
344d05045d
commit
6458a9144e
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -4437,6 +4437,7 @@ dependencies = [
|
|||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
"backtrace",
|
||||||
"client",
|
"client",
|
||||||
"clock",
|
"clock",
|
||||||
"collections",
|
"collections",
|
||||||
|
@ -37,6 +37,7 @@ util = { path = "../util" }
|
|||||||
aho-corasick = "0.7"
|
aho-corasick = "0.7"
|
||||||
anyhow = "1.0.57"
|
anyhow = "1.0.57"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
|
backtrace = "0.3"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
ignore = "0.4"
|
ignore = "0.4"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
|
@ -4635,7 +4635,12 @@ impl Project {
|
|||||||
let is_host = collaborator.replica_id == 0;
|
let is_host = collaborator.replica_id == 0;
|
||||||
this.collaborators.insert(new_peer_id, collaborator);
|
this.collaborators.insert(new_peer_id, collaborator);
|
||||||
|
|
||||||
if let Some(buffers) = this.shared_buffers.remove(&old_peer_id) {
|
let buffers = this.shared_buffers.remove(&old_peer_id);
|
||||||
|
println!(
|
||||||
|
"peer {} became {}. moving buffers {:?}",
|
||||||
|
old_peer_id, new_peer_id, &buffers
|
||||||
|
);
|
||||||
|
if let Some(buffers) = buffers {
|
||||||
this.shared_buffers.insert(new_peer_id, buffers);
|
this.shared_buffers.insert(new_peer_id, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5610,6 +5615,13 @@ impl Project {
|
|||||||
) -> u64 {
|
) -> u64 {
|
||||||
let buffer_id = buffer.read(cx).remote_id();
|
let buffer_id = buffer.read(cx).remote_id();
|
||||||
if let Some(project_id) = self.remote_id() {
|
if let Some(project_id) = self.remote_id() {
|
||||||
|
if buffer_id == 300015 {
|
||||||
|
println!(
|
||||||
|
"creating buffer for peer {}. {:?}",
|
||||||
|
peer_id,
|
||||||
|
backtrace::Backtrace::new()
|
||||||
|
);
|
||||||
|
}
|
||||||
let shared_buffers = self.shared_buffers.entry(peer_id).or_default();
|
let shared_buffers = self.shared_buffers.entry(peer_id).or_default();
|
||||||
if shared_buffers.insert(buffer_id) {
|
if shared_buffers.insert(buffer_id) {
|
||||||
let buffer = buffer.read(cx);
|
let buffer = buffer.read(cx);
|
||||||
|
Loading…
Reference in New Issue
Block a user