diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-24 11:01:49 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-24 11:05:36 +0100 |
| commit | 8d553d29829faaa3978b08811b3e40386b90db50 (patch) | |
| tree | 3f8b544ee7ac3d4e497714e8baf61bd66ca46738 /test_utils/src/lib.rs | |
| parent | 6d086a6608652193898ec548382e780733ea2f5a (diff) | |
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`
Diffstat (limited to 'test_utils/src/lib.rs')
| -rw-r--r-- | test_utils/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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<GitTestRepo> { | |||
| 1012 | Some((PROPOSAL_TITLE_1, "proposal a description")), | 1012 | Some((PROPOSAL_TITLE_1, "proposal a description")), |
| 1013 | None, | 1013 | None, |
| 1014 | )?; | 1014 | )?; |
| 1015 | std::thread::sleep(std::time::Duration::from_millis(1000)); | ||
| 1015 | cli_tester_create_proposal( | 1016 | cli_tester_create_proposal( |
| 1016 | &git_repo, | 1017 | &git_repo, |
| 1017 | FEATURE_BRANCH_NAME_2, | 1018 | FEATURE_BRANCH_NAME_2, |
| @@ -1019,6 +1020,7 @@ pub fn cli_tester_create_proposals() -> Result<GitTestRepo> { | |||
| 1019 | Some((PROPOSAL_TITLE_2, "proposal b description")), | 1020 | Some((PROPOSAL_TITLE_2, "proposal b description")), |
| 1020 | None, | 1021 | None, |
| 1021 | )?; | 1022 | )?; |
| 1023 | std::thread::sleep(std::time::Duration::from_millis(1000)); | ||
| 1022 | cli_tester_create_proposal( | 1024 | cli_tester_create_proposal( |
| 1023 | &git_repo, | 1025 | &git_repo, |
| 1024 | FEATURE_BRANCH_NAME_3, | 1026 | FEATURE_BRANCH_NAME_3, |
| @@ -1061,7 +1063,7 @@ pub fn cli_tester_create_proposal( | |||
| 1061 | in_reply_to: Option<String>, | 1063 | in_reply_to: Option<String>, |
| 1062 | ) -> Result<()> { | 1064 | ) -> Result<()> { |
| 1063 | create_and_populate_branch(test_repo, branch_name, prefix, false)?; | 1065 | create_and_populate_branch(test_repo, branch_name, prefix, false)?; |
| 1064 | 1066 | std::thread::sleep(std::time::Duration::from_millis(1000)); | |
| 1065 | if let Some(in_reply_to) = in_reply_to { | 1067 | if let Some(in_reply_to) = in_reply_to { |
| 1066 | let mut p = CliTester::new_from_dir( | 1068 | let mut p = CliTester::new_from_dir( |
| 1067 | &test_repo.dir, | 1069 | &test_repo.dir, |
| @@ -1115,6 +1117,7 @@ pub fn cli_tester_create_proposal( | |||
| 1115 | } | 1117 | } |
| 1116 | Ok(()) | 1118 | Ok(()) |
| 1117 | } | 1119 | } |
| 1120 | |||
| 1118 | /// returns (originating_repo, test_repo) | 1121 | /// returns (originating_repo, test_repo) |
| 1119 | pub fn create_proposals_and_repo_with_first_proposal_pulled_and_checkedout() | 1122 | pub fn create_proposals_and_repo_with_first_proposal_pulled_and_checkedout() |
| 1120 | -> Result<(GitTestRepo, GitTestRepo)> { | 1123 | -> Result<(GitTestRepo, GitTestRepo)> { |