Skip to content

Commit

Permalink
Ignore test that is failing for external reasons
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
  • Loading branch information
rylev committed Jan 29, 2024
1 parent b1f4e3c commit 0bea725
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,15 @@ update-cargo-locks:

.PHONY: test-unit
test-unit:
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip integration_tests --skip spinup_tests --skip cloud_tests --nocapture
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip spinup_tests --nocapture

.PHONY: test-crate
test-crate:
$(LOG_LEVEL_VAR) cargo test -p $(crate) --no-fail-fast -- --skip integration_tests --skip spinup_tests --skip cloud_tests --nocapture
$(LOG_LEVEL_VAR) cargo test -p $(crate) --no-fail-fast -- --skip spinup_tests --nocapture

.PHONY: test-integration
test-integration:
cargo test -F e2e-tests -- runtime_tests --nocapture; \
$(LOG_LEVEL_VAR) cargo test --test integration --no-fail-fast -- --skip spinup_tests --skip cloud_tests --nocapture
cargo test -F e2e-tests -- runtime_tests --nocapture

.PHONY: test-spin-up
test-spin-up:
Expand Down
1 change: 1 addition & 0 deletions tests/spinup_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ Caused by:

#[test]
#[cfg(feature = "e2e-tests")]
// Ignore until https://github.com/fermyon/spin-python-sdk/pull/65 is merged
fn http_python_template_smoke_test() -> anyhow::Result<()> {
http_smoke_test_template(
"http-py",
Expand Down
14 changes: 13 additions & 1 deletion tests/testing-framework/src/spin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,19 @@ impl Spin {
.enable_all()
.build()?;
let response = rt.block_on(async {
let mut response = reqwest::Client::new().execute(outgoing).await?;
let mut retries = 0;
let mut response = loop {
let Some(request) = outgoing.try_clone() else {
break reqwest::Client::new().execute(outgoing).await;
};
let response = reqwest::Client::new().execute(request).await;
if response.is_err() && retries < 5 {
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
retries += 1;
} else {
break response;
}
}?;
let mut chunks = Vec::new();
while let Some(chunk) = response.chunk().await? {
chunks.push(chunk.to_vec());
Expand Down

0 comments on commit 0bea725

Please sign in to comment.