Skip to content

Commit

Permalink
fix standalone_integration_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Oct 14, 2024
1 parent 2a9424e commit a8e222e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions crates/testing/tests/standalone_integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ fn test_calling_a_reducer_in_module(module_name: &'static str) {
DEFAULT_CONFIG,
|module| async move {
let json =
r#"{"CallReducer": {"reducer": "add", "args": "[\"Tyrion\", 24]", "request_id": 0 }}"#.to_string();
r#"{"CallReducer": {"reducer": "add", "args": "[\"Tyrion\", 24]", "request_id": 0, "flags": 0 }}"#.to_string();
module.send(json).await.unwrap();

let json =
r#"{"CallReducer": {"reducer": "add", "args": "[\"Cersei\", 31]", "request_id": 1 }}"#.to_string();
r#"{"CallReducer": {"reducer": "add", "args": "[\"Cersei\", 31]", "request_id": 1, "flags": 0 }}"#.to_string();
module.send(json).await.unwrap();

let json = r#"{"CallReducer": {"reducer": "say_hello", "args": "[]", "request_id": 2 }}"#.to_string();
let json = r#"{"CallReducer": {"reducer": "say_hello", "args": "[]", "request_id": 2, "flags": 0 }}"#.to_string();
module.send(json).await.unwrap();

let json = r#"{"CallReducer": {"reducer": "list_over_age", "args": "[30]", "request_id": 3 }}"#.to_string();
let json = r#"{"CallReducer": {"reducer": "list_over_age", "args": "[30]", "request_id": 3, "flags": 0 }}"#.to_string();
module.send(json).await.unwrap();

assert_eq!(
Expand Down Expand Up @@ -175,7 +175,8 @@ fn test_call_query_macro() {
"reducer": "test",
"args":
"[ { \"x\": 0, \"y\": 2, \"z\": \"Macro\" }, { \"foo\": \"Foo\" }, { \"Foo\": {} }, { \"Baz\": \"buzz\" } ]",
"request_id": 0
"request_id": 0,
"flags": 0
} }"#
.to_string();
module.send(json).await.unwrap();
Expand Down Expand Up @@ -251,7 +252,7 @@ fn test_index_scans() {
}

async fn bench_call<'a>(module: &ModuleHandle, call: &str, count: &u32) -> Duration {
let json = format!(r#"{{"CallReducer": {{"reducer": "{call}", "args": "[{count}]", "request_id": 0 }}}}"#);
let json = format!(r#"{{"CallReducer": {{"reducer": "{call}", "args": "[{count}]", "request_id": 0, "flags": 0 }}}}"#);

let now = Instant::now();

Expand Down

0 comments on commit a8e222e

Please sign in to comment.