From 8d553d29829faaa3978b08811b3e40386b90db50 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 24 Jul 2024 11:01:49 +0100 Subject: test: fix intermitant failures due to timestamp of proposals this is the same fix applied to `list` tests in bc1e9e7ff8d2c3747a7dbc3b649930ac5bc6425d but applied to `push` and `pull` --- test_utils/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test_utils') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 5cc6dd5..e6ce9c6 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -1012,6 +1012,7 @@ pub fn cli_tester_create_proposals() -> Result { Some((PROPOSAL_TITLE_1, "proposal a description")), None, )?; + std::thread::sleep(std::time::Duration::from_millis(1000)); cli_tester_create_proposal( &git_repo, FEATURE_BRANCH_NAME_2, @@ -1019,6 +1020,7 @@ pub fn cli_tester_create_proposals() -> Result { Some((PROPOSAL_TITLE_2, "proposal b description")), None, )?; + std::thread::sleep(std::time::Duration::from_millis(1000)); cli_tester_create_proposal( &git_repo, FEATURE_BRANCH_NAME_3, @@ -1061,7 +1063,7 @@ pub fn cli_tester_create_proposal( in_reply_to: Option, ) -> Result<()> { create_and_populate_branch(test_repo, branch_name, prefix, false)?; - + std::thread::sleep(std::time::Duration::from_millis(1000)); if let Some(in_reply_to) = in_reply_to { let mut p = CliTester::new_from_dir( &test_repo.dir, @@ -1115,6 +1117,7 @@ pub fn cli_tester_create_proposal( } Ok(()) } + /// returns (originating_repo, test_repo) pub fn create_proposals_and_repo_with_first_proposal_pulled_and_checkedout() -> Result<(GitTestRepo, GitTestRepo)> { -- cgit v1.2.3