Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gnalh committed Apr 30, 2024
1 parent 0ac07d6 commit ea7285c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub async fn get_quarantine_bulk_test_status(

resp.json::<QuarantineBulkTestStatus>()
.await
.context("Failed to get repsonse body as json")
.context("Failed to get response body as json")
}

/// Puts file to S3 using pre-signed link.
Expand Down
16 changes: 11 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ async fn run_test(test_args: TestArgs) -> anyhow::Result<i32> {
quarantine_results: Vec::new(),
}
} else {
Retry::spawn(default_delay(), || {
match Retry::spawn(default_delay(), || {
get_quarantine_bulk_test_status(
&api_address,
token,
Expand All @@ -347,10 +347,16 @@ async fn run_test(test_args: TestArgs) -> anyhow::Result<i32> {
)
})
.await
.unwrap_or(QuarantineBulkTestStatus {
group_is_quarantined: false,
quarantine_results: Vec::new(),
})
{
Ok(quarantine_results) => quarantine_results,
Err(e) => {
log::error!("Failed to get quarantine results: {:?}", e);
QuarantineBulkTestStatus {
group_is_quarantined: false,
quarantine_results: Vec::new(),
}
}
}
};

log::info!("Quarantine results: {:?}", quarantine_results);
Expand Down
3 changes: 2 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ pub struct Test {
#[derive(Debug, Serialize, Clone, Deserialize)]
pub struct QuarantineResult {
pub name: String,
#[serde(rename = "parentName")]
pub parent_name: String,
#[serde(rename = "quarantinedSince")]
pub quarantined_since: i64,
pub quarantined_since: String,
pub file: String,
#[serde(rename = "className")]
pub class_name: String,
Expand Down

0 comments on commit ea7285c

Please sign in to comment.