Skip to content

Commit

Permalink
chore: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Nov 9, 2023
1 parent cbb2ccb commit 6d39cc6
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions homestar-runtime/tests/webserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fn test_workflow_run_serial() -> Result<()> {
.build(ws_url.clone())
.await
.unwrap();

let mut sub1: Subscription<Vec<u8>> = client1
.subscribe(
SUBSCRIBE_RUN_WORKFLOW_ENDPOINT,
Expand All @@ -106,7 +107,7 @@ fn test_workflow_run_serial() -> Result<()> {
// we have 3 operations
let one = sub1
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap();
let json: serde_json::Value = serde_json::from_slice(&one.unwrap().unwrap()).unwrap();
Expand All @@ -116,7 +117,7 @@ fn test_workflow_run_serial() -> Result<()> {

let two = sub1
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap();
let json: serde_json::Value = serde_json::from_slice(&two.unwrap().unwrap()).unwrap();
Expand All @@ -126,7 +127,7 @@ fn test_workflow_run_serial() -> Result<()> {

let three = sub1
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap();
let json: serde_json::Value = serde_json::from_slice(&three.unwrap().unwrap()).unwrap();
Expand All @@ -146,7 +147,7 @@ fn test_workflow_run_serial() -> Result<()> {

let msg = sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap();
let json: serde_json::Value = serde_json::from_slice(&msg.unwrap().unwrap()).unwrap();
Expand All @@ -156,13 +157,13 @@ fn test_workflow_run_serial() -> Result<()> {

assert!(sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
assert!(sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
Expand All @@ -179,25 +180,25 @@ fn test_workflow_run_serial() -> Result<()> {

let _ = sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.is_err();

assert!(sub3
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
assert!(sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
assert!(sub2
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
Expand All @@ -215,24 +216,24 @@ fn test_workflow_run_serial() -> Result<()> {

let _ = sub3
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.is_err();
assert!(sub4
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
assert!(sub4
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
assert!(sub4
.next()
.with_timeout(std::time::Duration::from_millis(5000))
.with_timeout(std::time::Duration::from_millis(10000))
.await
.unwrap()
.is_some());
Expand Down

0 comments on commit 6d39cc6

Please sign in to comment.