Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-ricciardi committed Oct 15, 2024
1 parent 0d857c9 commit da8fb78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
1 change: 0 additions & 1 deletion client/zawgl-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::HashMap;
use futures_channel::mpsc::UnboundedSender;
use futures_channel::oneshot::{Sender, Canceled};
use futures_util::StreamExt;
use tokio_tungstenite::tungstenite::client::IntoClientRequest;
use tokio_tungstenite::{connect_async, tungstenite::protocol::Message};
use serde_json::{from_str, json, value::Value};
use uuid::Uuid;
Expand Down
15 changes: 0 additions & 15 deletions client/zawgl-client/src/parameters.rs

This file was deleted.

4 changes: 3 additions & 1 deletion integration/cypher-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

use log::LevelFilter;
use serde_json::Value;
use simple_logger::SimpleLogger;
use zawgl_core::{model::init::InitContext, test_utils::build_dir_path_and_rm_old};
use zawgl_client::Client;
use std::future::Future;
Expand All @@ -27,7 +29,7 @@ pub async fn run_test<F, T>(db_name: &str, port: i32, lambda: F) where F : FnOnc

println!("BEGIN RUN {}", db_name);
let db_dir = build_dir_path_and_rm_old(db_name).expect("error");

SimpleLogger::new().with_level(LevelFilter::Debug).init().unwrap();
let ctx = InitContext::new(&db_dir).expect("can't create database context");
let (tx_start, rx_start) = tokio::sync::oneshot::channel::<()>();
let address = format!("localhost:{}", port);
Expand Down
5 changes: 3 additions & 2 deletions integration/cypher-tests/tests/aggregation_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ async fn _test_aggregation_1(mut client: Client) {
for _ in 0..10 {
let result = client.execute_cypher_request("create (test:Person) return test").await;
if let Ok(doc) = result {
println!("{}", doc.to_string());
let id = extract_node_id(doc).expect("node id");
for __ in 0..10 {
let p = json!({
"pid": id,
"weight": 1
});
let result = client.execute_cypher_request_with_parameters("match (s:Person) where id(s) = $pid create (s)-[:IsFriendOf]->(new:Person {weight: $weight}) return new, s", p).await;
let res = result.expect("new person");
let r1 = client.execute_cypher_request_with_parameters("match (s:Person) where id(s) = $pid create (s)-[:IsFriendOf]->(new:Person {weight: $weight}) return new, s", p).await;
let res = r1.expect("new person");
println!("{}", res.to_string());
}
}
Expand Down

0 comments on commit da8fb78

Please sign in to comment.