Skip to content

Commit

Permalink
cheating
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
  • Loading branch information
brooksmtownsend committed Aug 11, 2023
1 parent 1f78f23 commit 2d221ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/e2e_multiple_hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ async fn test_no_requirements(client_info: &ClientInfo) {
)
}

let inventory = client_info.get_all_inventory("default").await?;
// sleep for 2 seconds
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
// SAFETY: we already know some status existed when we checked for compensating. If there's no status now, it means
// we borked our stream and this _should_ fail
let status = get_manifest_status(&stream, "default", "echo-simple")
Expand Down Expand Up @@ -201,6 +204,9 @@ async fn test_no_requirements(client_info: &ClientInfo) {
ExpectedCount::Exactly(0),
)?;

let inventory = client_info.get_all_inventory("default").await?;
// sleep for 2 seconds
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
let status = get_manifest_status(&stream, "default", "echo-simple")
.await
.unwrap();
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e_multitenant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ async fn test_basic_separation(client_info: &ClientInfo) -> anyhow::Result<()> {
links
)
}
let east_inventory = client_info.get_all_inventory(LATTICE_EAST).await?;
let west_inventory = client_info.get_all_inventory(LATTICE_WEST).await?;

match (
get_manifest_status(&stream, LATTICE_EAST, "echo-simple").await,
Expand Down Expand Up @@ -317,6 +319,8 @@ async fn test_basic_separation(client_info: &ClientInfo) -> anyhow::Result<()> {
);

// Give wadm a literal second to process the manifest_unpublished event and update the status
let east_inventory = client_info.get_all_inventory(LATTICE_EAST).await?;
let west_inventory = client_info.get_all_inventory(LATTICE_WEST).await?;
tokio::time::sleep(std::time::Duration::from_secs(1)).await;

match (
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e_upgrades.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ async fn test_upgrade(client_info: &ClientInfo) {
}

// Sleep for 2 seconds
let inventory = client_info.get_all_inventory("default").await?;
tokio::time::sleep(std::time::Duration::from_secs(2)).await;

// SAFETY: we already know some status existed when we checked for compensating. If there's no status now, it means
Expand Down Expand Up @@ -281,6 +282,9 @@ async fn test_upgrade(client_info: &ClientInfo) {
links
)
}
// sleep for 2 seconds
let inventory = client_info.get_all_inventory("default").await?;
tokio::time::sleep(std::time::Duration::from_secs(2)).await;

let status = get_manifest_status(&stream, "default", "updateapp")
.await
Expand Down

0 comments on commit 2d221ae

Please sign in to comment.