Skip to content

Commit 79e47a5

Browse files
committed
test: add assertion to assure ThreadSafeRepository is sync.
If it doesn't appear to be sync, be sure to use the `max-performance-safe` feature.
1 parent 53bbd06 commit 79e47a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gix/tests/repository/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::util;
12
use gix::Repository;
23

34
mod config;
@@ -24,3 +25,11 @@ fn size_in_memory() {
2425
"size of Repository shouldn't change without us noticing, it's meant to be cloned: should have been below {limit:?}, was {actual_size} (bigger on windows)"
2526
);
2627
}
28+
29+
#[test]
30+
#[cfg(feature = "parallel")]
31+
fn thread_safe_repository_is_sync() -> crate::Result {
32+
fn f<T: Send + Sync + Clone>(_t: T) {}
33+
f(util::basic_repo()?.into_sync());
34+
Ok(())
35+
}

0 commit comments

Comments
 (0)