diff options
author | Cyborus <cyborus@cyborus.xyz> | 2023-12-10 07:57:15 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2023-12-11 21:50:39 +0100 |
commit | f6041483c846a3e528345b27dbf0d32bf1179cd5 (patch) | |
tree | 5742c5ccf4e80f30a0af7ab85d144ada3e54b33e /tests | |
parent | api error message optional (diff) | |
download | forgejo-api-f6041483c846a3e528345b27dbf0d32bf1179cd5.tar.xz forgejo-api-f6041483c846a3e528345b27dbf0d32bf1179cd5.zip |
add delay
seems to send the next request too quickly, so wait a bit to let forgejo
catch up
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ci_test.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ci_test.rs b/tests/ci_test.rs index 9c5d8b5..7fec55c 100644 --- a/tests/ci_test.rs +++ b/tests/ci_test.rs @@ -80,6 +80,7 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> { trust_model: forgejo_api::TrustModel::Default, }; let remote_repo = api.create_repo(repo_opt).await?; + tokio::time::sleep(std::time::Duration::from_secs(3)).await; ensure!(remote_repo.owner.login == "TestingAdmin", "repo owner is not \"TestingAdmin\""); ensure!(remote_repo.name == "test", "repo owner is not \"test\""); @@ -123,6 +124,7 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> { title: "test pr".into(), }; let pr = api.create_pr("TestingAdmin", "test", pr_opt).await.wrap_err("couldn't create pr")?; + tokio::time::sleep(std::time::Duration::from_secs(3)).await; let is_merged = api.is_merged("TestingAdmin", "test", pr.number).await.wrap_err_with(|| eyre!("couldn't find unmerged pr {}", pr.number))?; ensure!(!is_merged, "pr should not yet be merged"); let merge_opt = forgejo_api::MergePullRequestOption { |