mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-09 05:58:55 +00:00
test_working_copy_concurrent: run only with git backend
I don't see any reason for these tests to differ depending on backend, so let's avoid running them twice (there are probably lots of other tests that we're also running with different backends for little reason).
This commit is contained in:
parent
861788ae09
commit
e364c49854
1 changed files with 6 additions and 9 deletions
|
@ -20,16 +20,14 @@ use jj_lib::repo::{Repo, StoreFactories};
|
|||
use jj_lib::repo_path::RepoPath;
|
||||
use jj_lib::working_copy::{CheckoutError, SnapshotOptions};
|
||||
use jj_lib::workspace::Workspace;
|
||||
use test_case::test_case;
|
||||
use testutils::TestWorkspace;
|
||||
|
||||
#[test_case(false ; "local backend")]
|
||||
#[test_case(true ; "git backend")]
|
||||
fn test_concurrent_checkout(use_git: bool) {
|
||||
#[test]
|
||||
fn test_concurrent_checkout() {
|
||||
// Test that we error out if a concurrent checkout is detected (i.e. if the
|
||||
// working-copy commit changed on disk after we read it).
|
||||
let settings = testutils::user_settings();
|
||||
let mut test_workspace1 = TestWorkspace::init(&settings, use_git);
|
||||
let mut test_workspace1 = TestWorkspace::init(&settings, true);
|
||||
let repo1 = test_workspace1.repo.clone();
|
||||
let workspace1_root = test_workspace1.workspace.workspace_root().clone();
|
||||
|
||||
|
@ -78,13 +76,12 @@ fn test_concurrent_checkout(use_git: bool) {
|
|||
);
|
||||
}
|
||||
|
||||
#[test_case(false ; "local backend")]
|
||||
#[test_case(true ; "git backend")]
|
||||
fn test_checkout_parallel(use_git: bool) {
|
||||
#[test]
|
||||
fn test_checkout_parallel() {
|
||||
// Test that concurrent checkouts by different processes (simulated by using
|
||||
// different repo instances) is safe.
|
||||
let settings = testutils::user_settings();
|
||||
let mut test_workspace = TestWorkspace::init(&settings, use_git);
|
||||
let mut test_workspace = TestWorkspace::init(&settings, true);
|
||||
let repo = &test_workspace.repo;
|
||||
let workspace_root = test_workspace.workspace.workspace_root().clone();
|
||||
|
||||
|
|
Loading…
Reference in a new issue