You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by hg...@apache.org on 2026/08/18 08:41:14 UTC

(iggy) 02/02: test(cluster): rename Command2 to Command after v2 bridge removal

This is an automated email from the ASF dual-hosted git repository.

hubcio pushed a commit to branch cluster-crash-durability
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit cb11db024edc7e02ea91d9dabaf4d3108306b353
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Tue Aug 18 10:39:46 2026 +0200

    test(cluster): rename Command2 to Command after v2 bridge removal
---
 core/integration/tests/cluster/client_table_adversarial.rs | 10 +++++-----
 core/shard/src/router.rs                                   |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/integration/tests/cluster/client_table_adversarial.rs b/core/integration/tests/cluster/client_table_adversarial.rs
index 50d913c63..10af0e749 100644
--- a/core/integration/tests/cluster/client_table_adversarial.rs
+++ b/core/integration/tests/cluster/client_table_adversarial.rs
@@ -41,7 +41,7 @@ use consensus::client_table::REPLY_RING_CAPACITY;
 use iggy::prelude::*;
 use iggy_binary_protocol::codec::{WireDecode, WireEncode};
 use iggy_binary_protocol::consensus::{
-    Command2, Operation, ReplyHeader, RequestHeader, read_size_field, result_code,
+    Command, Operation, ReplyHeader, RequestHeader, read_size_field, result_code,
     result_section_len,
 };
 use iggy_binary_protocol::requests::streams::CreateStreamRequest;
@@ -211,7 +211,7 @@ fn create_stream_payload(name: &str) -> Bytes {
 
 fn request_header(client: u128, session: u64, request: u64, body_len: usize) -> RequestHeader {
     RequestHeader {
-        command: Command2::Request,
+        command: Command::Request,
         operation: Operation::CreateStream,
         size: u32::try_from(HEADER_SIZE + body_len).unwrap(),
         client,
@@ -254,7 +254,7 @@ async fn login_on(stream: &mut TcpStream, client: u128) -> Option<u64> {
     }
     .to_bytes();
     let header = RequestHeader {
-        command: Command2::Request,
+        command: Command::Request,
         operation: Operation::Register,
         size: u32::try_from(HEADER_SIZE + body.len()).unwrap(),
         client,
@@ -424,14 +424,14 @@ async fn exchange(stream: &mut TcpStream, header: &RequestHeader, body: &Bytes)
     }
 
     let command_offset = offset_of!(RequestHeader, command);
-    if reply_header[command_offset] == Command2::Eviction as u8 {
+    if reply_header[command_offset] == Command::Eviction as u8 {
         return Exchange::Eviction {
             reason: reply_header[HEADER_SIZE - 1],
         };
     }
     assert_eq!(
         reply_header[command_offset],
-        Command2::Reply as u8,
+        Command::Reply as u8,
         "expected a Reply frame"
     );
 
diff --git a/core/shard/src/router.rs b/core/shard/src/router.rs
index 9a806a478..45b6cc3c4 100644
--- a/core/shard/src/router.rs
+++ b/core/shard/src/router.rs
@@ -769,7 +769,7 @@ enum ReplicaHandshakeOutcome {
 #[cfg(test)]
 mod tests {
     use iggy_binary_protocol::{
-        Command2, ConsensusError, GenericHeader, HEADER_SIZE, PrepareHeader, frame_checksum_bytes,
+        Command, ConsensusError, GenericHeader, HEADER_SIZE, PrepareHeader, frame_checksum_bytes,
     };
     use server_common::iobuf::Owned;
     use server_common::{MESSAGE_ALIGN, Message, MessageBag};
@@ -805,7 +805,7 @@ mod tests {
             let size_offset = offset_of!(PrepareHeader, size);
             let frame_size = u32::try_from(HEADER_SIZE).expect("header size fits in u32");
             frame[size_offset..size_offset + 4].copy_from_slice(&frame_size.to_le_bytes());
-            frame[offset_of!(PrepareHeader, command)] = Command2::Prepare as u8;
+            frame[offset_of!(PrepareHeader, command)] = Command::Prepare as u8;
             let client_offset = offset_of!(PrepareHeader, client);
             frame[client_offset..client_offset + 16].copy_from_slice(&0xCAFE_u128.to_le_bytes());
             frame[offset_of!(PrepareHeader, operation)] = OPERATION_FROM_A_NEWER_RELEASE;