diff --git a/Cargo.lock b/Cargo.lock index 1df8b7ca1..69596d7f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -73,9 +73,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8" +checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" [[package]] name = "arc-swap" @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" [[package]] name = "byteorder" @@ -309,31 +309,8 @@ checksum = "8234d29d30873ab5a41e3557b8515d3ecbaefb1ea5be579425b3b0074b6d0e40" [[package]] name = "cassandra-protocol" -version = "2.0.0-beta.1" -source = "git+https://github.com/krojew/cdrs-tokio#f1d7c62bc1dd4e00ee211831db0a989d646f1013" -dependencies = [ - "arc-swap", - "arrayref", - "bitflags", - "chrono", - "crc32fast", - "derivative", - "derive_more", - "float_eq", - "integer-encoding", - "itertools", - "lz4_flex", - "num", - "snap", - "thiserror", - "time 0.3.13", - "uuid 1.1.2", -] - -[[package]] -name = "cassandra-protocol" -version = "2.0.0" -source = "git+https://github.com/krojew/cdrs-tokio?rev=7d6d8fee723a232f17b4173de61e6fd9eb4d4505#7d6d8fee723a232f17b4173de61e6fd9eb4d4505" +version = "2.0.0-beta.2" +source = "git+https://github.com/krojew/cdrs-tokio#33bd4692936e3a2cbe247ed5fb6639c9b173e486" dependencies = [ "arc-swap", "arrayref", @@ -370,13 +347,13 @@ checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cdrs-tokio" -version = "7.0.0" -source = "git+https://github.com/krojew/cdrs-tokio?rev=7d6d8fee723a232f17b4173de61e6fd9eb4d4505#7d6d8fee723a232f17b4173de61e6fd9eb4d4505" +version = "7.0.0-beta.2" +source = "git+https://github.com/krojew/cdrs-tokio#33bd4692936e3a2cbe247ed5fb6639c9b173e486" dependencies = [ "arc-swap", "atomic", "bytes", - "cassandra-protocol 2.0.0", + "cassandra-protocol", "derivative", "derive_more", "futures", @@ -815,9 +792,9 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "either" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encoding_rs" @@ -1083,9 +1060,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ "bytes", "fnv", @@ -1258,9 +1235,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf7d67cf4a22adc5be66e75ebdf769b3f2ea032041437a7061f97a63dad4b" +checksum = "ef5528d9c2817db4e10cc78f8d4c8228906e5854f389ff6b076cee3572a09d35" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1364,9 +1341,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.131" +version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40" +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" [[package]] name = "libloading" @@ -1592,14 +1569,16 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" dependencies = [ + "autocfg", "bitflags", "cfg-if", "libc", "memoffset", + "pin-utils", ] [[package]] @@ -1797,9 +1776,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" +checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" [[package]] name = "oorandom" @@ -1918,16 +1897,16 @@ dependencies = [ [[package]] name = "pcap" -version = "0.9.2" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d1868a121e5f1d78134be7148b778d5352f28b7be30e7f993c3439671f0190" +checksum = "2da544c8115cc65b474554569c7654fc94a4f6a167f79192536e148fd654e17a" dependencies = [ + "bitflags", "errno", "libc", "libloading", "regex", - "widestring", - "winapi", + "windows-sys", ] [[package]] @@ -2052,9 +2031,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aa09d53386a2226b0d1d8c1110c1e25d029d37cce6fcfdf9e1d4d26a6ab3326" +checksum = "b303a15aeda678da614ab23306232dbd282d532f8c5919cedd41b66b9dc96560" [[package]] name = "ppv-lite86" @@ -2211,9 +2190,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "10.4.0" +version = "10.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c49596760fce12ca21550ac21dc5a9617b2ea4b6e0aa7d8dab8ff2824fc2bba" +checksum = "6aa2540135b6a94f74c7bc90ad4b794f822026a894f3d7bcd185c100d13d4ad6" dependencies = [ "bitflags", ] @@ -2679,10 +2658,11 @@ dependencies = [ [[package]] name = "serial_test" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eec42e7232e5ca56aa59d63af3c7f991fe71ee6a3ddd2d3480834cf3902b007" +checksum = "92761393ee4dc3ff8f4af487bd58f4307c9329bbedea02cac0089ad9c411e153" dependencies = [ + "dashmap", "futures", "lazy_static", "log", @@ -2692,14 +2672,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b95bb2f4f624565e8fe8140c789af7e2082c0e0561b5a82a1b678baa9703dc" +checksum = "4b6f5d1c3087fb119617cff2966fe3808a80e5eb59a8c1601d5994d66f4346a5" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "rustversion", "syn", ] @@ -2760,7 +2739,7 @@ dependencies = [ "bytes-utils", "cached", "cassandra-cpp", - "cassandra-protocol 2.0.0-beta.1", + "cassandra-protocol", "cdrs-tokio", "chacha20poly1305", "clap 3.2.17", @@ -3540,12 +3519,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "widestring" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7157704c2e12e3d2189c507b7482c52820a16dfa4465ba91add92f266667cadb" - [[package]] name = "winapi" version = "0.3.9" diff --git a/shotover-proxy/Cargo.toml b/shotover-proxy/Cargo.toml index ff67290da..0858055c2 100644 --- a/shotover-proxy/Cargo.toml +++ b/shotover-proxy/Cargo.toml @@ -78,18 +78,18 @@ generic-array = { version = "0.14", features = ["serde"] } rayon = "1.5.1" criterion = { git = "https://github.com/shotover/criterion.rs", branch = "version-0.4", version = "0.3", features = ["async_tokio", "html_reports"] } redis = { version = "0.21.0", features = ["tokio-comp", "cluster"] } -pcap = "0.9.0" +pcap = "0.10.0" pktparse = { version = "0.7.0", features = ["serde"] } tls-parser = "0.11.0" tokio-io-timeout = "1.1.1" -serial_test = "0.8.0" +serial_test = "0.9.0" cassandra-cpp = "1.1.0" test-helpers = { path = "../test-helpers" } hex-literal = "0.3.3" -nix = "0.24.0" +nix = "0.25.0" reqwest = "0.11.6" metrics-util = "0.14.0" -cdrs-tokio = { git = "https://github.com/krojew/cdrs-tokio", rev = "7d6d8fee723a232f17b4173de61e6fd9eb4d4505" } +cdrs-tokio = { git = "https://github.com/krojew/cdrs-tokio" } scylla = { version = "0.4.7", features = ["ssl"] } [[bench]] diff --git a/shotover-proxy/tests/cassandra_int_tests/mod.rs b/shotover-proxy/tests/cassandra_int_tests/mod.rs index cfc0e7b20..7d34077d7 100644 --- a/shotover-proxy/tests/cassandra_int_tests/mod.rs +++ b/shotover-proxy/tests/cassandra_int_tests/mod.rs @@ -492,10 +492,9 @@ async fn test_events_keyspace() { let mut event_recv = session.create_event_receiver(); - sleep(Duration::from_secs(3)).await; // let the driver finish connecting to the cluster and registering for the events + sleep(Duration::from_secs(10)).await; // let the driver finish connecting to the cluster and registering for the events let create_ks = "CREATE KEYSPACE IF NOT EXISTS test_events_ks WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"; - session.query(create_ks).await.unwrap(); let event = timeout(Duration::from_secs(10), event_recv.recv()) diff --git a/shotover-proxy/tests/codec/util/packet_capture.rs b/shotover-proxy/tests/codec/util/packet_capture.rs index 0c466dceb..ef25e21a9 100644 --- a/shotover-proxy/tests/codec/util/packet_capture.rs +++ b/shotover-proxy/tests/codec/util/packet_capture.rs @@ -29,7 +29,7 @@ impl PacketCapture { pub fn save_to_file(&mut self, mut cap_handle: Capture, file_name: &str) { match cap_handle.savefile(&file_name) { Ok(mut file) => { - while let Ok(packet) = cap_handle.next() { + while let Ok(packet) = cap_handle.next_packet() { file.write(&packet); } } @@ -42,7 +42,7 @@ impl PacketCapture { pub fn print_to_console(&mut self, mut cap_handle: Capture) { self.print_headers(); - while let Ok(packet) = cap_handle.next() { + while let Ok(packet) = cap_handle.next_packet() { let packet = OwnedPcapPacket::from(packet); let packet_parse = PacketParse::default(); let parsed_packet = packet_parse.parse_packet(&packet); @@ -136,7 +136,8 @@ impl PacketCapture { } let packets: Vec<_> = - std::iter::from_fn(move || cap_handle.next().ok().map(OwnedPcapPacket::from)).collect(); + std::iter::from_fn(move || cap_handle.next_packet().ok().map(OwnedPcapPacket::from)) + .collect(); packets .par_iter() diff --git a/test-helpers/Cargo.toml b/test-helpers/Cargo.toml index 974604500..3752410d3 100644 --- a/test-helpers/Cargo.toml +++ b/test-helpers/Cargo.toml @@ -12,5 +12,5 @@ tracing = "0.1.15" subprocess = "0.2.7" anyhow = "1.0.42" regex = "1.5.5" -nix = "0.24.0" +nix = "0.25.0" rcgen = "0.9.2"