From b0c6c082a14b3a13c2d160041e5b36893a11f014 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 5 Apr 2025 13:45:28 +0100 Subject: [PATCH] Fix tests and ignore expensive test --- .github/workflows/check.yml | 2 +- backend/reconcile/src/operation_transformation.rs | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d7f73c6..41b35a9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -45,7 +45,7 @@ jobs: - name: Test backend run: | cd backend - cargo test --verbose + cargo test --verbose -- --include-ignored cd sync_lib wasm-pack test --node diff --git a/backend/reconcile/src/operation_transformation.rs b/backend/reconcile/src/operation_transformation.rs index afff26c..6a2ee8e 100644 --- a/backend/reconcile/src/operation_transformation.rs +++ b/backend/reconcile/src/operation_transformation.rs @@ -132,7 +132,7 @@ mod test { "both the same word", ); - test_merge_both_ways(" ", "it’s utf-8!", " ", "it’s utf-8!"); + test_merge_both_ways(" ", "it’s utf-8!", " ", "it’s utf-8!"); test_merge_both_ways( "both delete the same word but one a bit more", @@ -173,7 +173,7 @@ mod test { " |7ca2b36d-6ee7-49eb-8eb1-d77e4cc1a001| ", " |7ca2b36d-6ee7-49eb-8eb1-d77e4cc1a001| |cd9195cc-103a-4f13-90c8-4fba0ba421ee| |d39156cc-cfd6-42a8-b70a-75020896069d| |fbad794c-9c47-41f2-a343-490284ecb5a0| |dup| ", " |7ca2b36d-6ee7-49eb-8eb1-d77e4cc1a001| |cd9195cc-103a-4f13-90c8-4fba0ba421ee| |dup| ", - " |7ca2b36d-6ee7-49eb-8eb1-d77e4cc1a001| |cd9195cc-103a-4f13-90c8-4fba0ba421ee| |d39156cc-cfd6-42a8-b70a-75020896069d| |fbad794c-9c47-41f2-a343-490284ecb5a0| |dup| |dup| "); + " |7ca2b36d-6ee7-49eb-8eb1-d77e4cc1a001| |cd9195cc-103a-4f13-90c8-4fba0ba421ee| |d39156cc-cfd6-42a8-b70a-75020896069d| |fbad794c-9c47-41f2-a343-490284ecb5a0| |dup| |dup| "); } #[test] @@ -358,23 +358,26 @@ mod test { ); } + #[ignore = "expensive to run, only run in CI"] #[test_matrix( [ "pride_and_prejudice.txt", "romeo_and_juliet.txt", "room_with_a_view.txt", "kun_lu.txt", - + "blns.txt" ], [ "pride_and_prejudice.txt", "romeo_and_juliet.txt", "room_with_a_view.txt", - "kun_lu.txt" + "kun_lu.txt", + "blns.txt" ], [ "pride_and_prejudice.txt", "romeo_and_juliet.txt", "room_with_a_view.txt", - "kun_lu.txt" - ], [0..10000, 10000..20000], [0..10000, 10000..20000], [0..10000, 10000..20000])] + "kun_lu.txt", + "blns.txt" + ], [0..10000, 10000..20000, 20000..50000], [0..10000, 10000..20000, 20000..50000], [0..10000, 10000..20000, 20000..50000])] fn test_merge_files_without_panic( file_name_1: &str, file_name_2: &str,