Skip to content

Commit

Permalink
Fix evaluation order
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Dec 17, 2024
1 parent a40c0a7 commit 9d66bfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/src/http/feature_refresher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl FeatureRefresher {
persistence,
strict: config.strict,
streaming: config.streaming,
app_name: config.app_name.into(),
app_name: config.app_name,
}
}

Expand Down
6 changes: 4 additions & 2 deletions server/tests/streaming_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod streaming_test {

let mut stream = es_client.stream();

if let Err(_) = tokio::time::timeout(std::time::Duration::from_secs(2), async {
if tokio::time::timeout(std::time::Duration::from_secs(2), async {
loop {
if let Some(Ok(event)) = stream.next().await {
match event {
Expand All @@ -115,6 +115,7 @@ mod streaming_test {
}
})
.await
.is_err()
{
// If the test times out, kill the app process and fail the test
edge.kill().expect("Failed to kill the app process");
Expand All @@ -127,7 +128,7 @@ mod streaming_test {
features_from_disk("../examples/hostedexample.json"),
);

if let Err(_) = tokio::time::timeout(std::time::Duration::from_secs(2), async {
if tokio::time::timeout(std::time::Duration::from_secs(2), async {
loop {
if let Some(Ok(event)) = stream.next().await {
match event {
Expand All @@ -150,6 +151,7 @@ mod streaming_test {
}
})
.await
.is_err()
{
// If the test times out, kill the app process and fail the test
edge.kill().expect("Failed to kill the app process");
Expand Down

0 comments on commit 9d66bfd

Please sign in to comment.