From 7b05a5bbd242c674cf64831d0320e56490f32bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20G=C3=B6rtler?= Date: Tue, 14 Jan 2025 15:08:43 +0100 Subject: [PATCH 1/3] Fix flaky `re_graph_view` test by removing dynamically-placed node --- crates/viewer/re_view_graph/tests/basic.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/viewer/re_view_graph/tests/basic.rs b/crates/viewer/re_view_graph/tests/basic.rs index c34fb9e7fc31..e5f41e850ec1 100644 --- a/crates/viewer/re_view_graph/tests/basic.rs +++ b/crates/viewer/re_view_graph/tests/basic.rs @@ -89,9 +89,11 @@ pub fn self_and_multi_edges() { components::GraphEdge(("B", "A").into()), // duplicated self-edges components::GraphEdge(("A", "A").into()), + // TODO(grtlr): investigate instabilities in the graph layout to be able + // to test dynamically placed nodes. // implicit edges - components::GraphEdge(("B", "C").into()), - components::GraphEdge(("C", "C").into()), + // components::GraphEdge(("B", "C").into()), + // components::GraphEdge(("C", "C").into()), ]; let directed = components::GraphType::Directed; From f523ee8c6a48cf192d145a19b6e1cb62d2f23ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20G=C3=B6rtler?= Date: Tue, 14 Jan 2025 15:30:16 +0100 Subject: [PATCH 2/3] Fix tests and update snapshots --- crates/viewer/re_view_graph/Cargo.toml | 1 + .../tests/snapshots/self_and_multi_edges.old.png | 3 +++ .../re_view_graph/tests/snapshots/self_and_multi_edges.png | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png diff --git a/crates/viewer/re_view_graph/Cargo.toml b/crates/viewer/re_view_graph/Cargo.toml index 4da414d45aef..576f8330d97c 100644 --- a/crates/viewer/re_view_graph/Cargo.toml +++ b/crates/viewer/re_view_graph/Cargo.toml @@ -43,4 +43,5 @@ nohash-hasher.workspace = true [dev-dependencies] egui_kittest.workspace = true re_chunk_store.workspace = true +re_viewer_context = { workspace = true, features = ["testing"] } re_viewport.workspace = true diff --git a/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png b/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png new file mode 100644 index 000000000000..717de4e62c9a --- /dev/null +++ b/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:545e27567603726522bf898e05427a462752c345d77d603762713e1735020db0 +size 24359 diff --git a/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.png b/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.png index 717de4e62c9a..19135e629724 100644 --- a/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.png +++ b/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:545e27567603726522bf898e05427a462752c345d77d603762713e1735020db0 -size 24359 +oid sha256:7c9674e1320b5f097078357c41fd56d16007ad30d12a9296ee8c77c35f52b0d2 +size 22355 From 6f9d65d8e20bbc9b1f3efe6088001ac24dad5f10 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Tue, 14 Jan 2025 19:23:08 +0100 Subject: [PATCH 3/3] running the test deletes this file, so... --- .../re_view_graph/tests/snapshots/self_and_multi_edges.old.png | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png diff --git a/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png b/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png deleted file mode 100644 index 717de4e62c9a..000000000000 --- a/crates/viewer/re_view_graph/tests/snapshots/self_and_multi_edges.old.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:545e27567603726522bf898e05427a462752c345d77d603762713e1735020db0 -size 24359