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/10/23 16:19:01 UTC

(iggy) branch perf/ci-stable-test-builds updated: perf(ci): remove exhaustive polling equivalence tests

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

hubcio pushed a commit to branch perf/ci-stable-test-builds
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/perf/ci-stable-test-builds by this push:
     new 72f36a560 perf(ci): remove exhaustive polling equivalence tests
72f36a560 is described below

commit 72f36a5600ee64e16bf53b3e0e308683e67d26db
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Fri Oct 23 18:18:34 2026 +0200

    perf(ci): remove exhaustive polling equivalence tests
    
    Exhaustive polling comparisons add substantial interpreted work.
    Remove the encoding and mutation suites and their priority filters.
    Keep the remaining polling round-trip and truncation checks.
---
 .config/nextest.toml                               |   9 +-
 .../src/requests/messages/poll_messages.rs         | 192 ---------------------
 2 files changed, 3 insertions(+), 198 deletions(-)

diff --git a/.config/nextest.toml b/.config/nextest.toml
index eca4acbfb..cfb54ed76 100644
--- a/.config/nextest.toml
+++ b/.config/nextest.toml
@@ -102,13 +102,10 @@ slow-timeout = { period = "60s", terminate-after = 5 }
 slow-timeout = { period = "60s" }
 
 [[profile.default-miri.overrides]]
-# Start the longest interpreted tests early so other work overlaps them.
+# Start the options boundary test early so other work overlaps it.
 filter = '''
-    package(=iggy_binary_protocol) & (
-        test(=primitives::options::tests::entry_count_over_limit_is_rejected)
-        | test(~requests::messages::poll_messages::tests::progress_peek_encodings::)
-        | test(~requests::messages::poll_messages::tests::progress_peek_mutations::)
-    )
+    package(=iggy_binary_protocol)
+    & test(=primitives::options::tests::entry_count_over_limit_is_rejected)
 '''
 priority = 100
 
diff --git a/core/binary_protocol/src/requests/messages/poll_messages.rs b/core/binary_protocol/src/requests/messages/poll_messages.rs
index 2af46f046..9fef37778 100644
--- a/core/binary_protocol/src/requests/messages/poll_messages.rs
+++ b/core/binary_protocol/src/requests/messages/poll_messages.rs
@@ -147,198 +147,6 @@ impl WireDecode for PollMessagesRequest {
 mod tests {
     use super::*;
 
-    mod progress_peek_encodings {
-        use super::*;
-
-        #[test]
-        fn given_numeric_consumer_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::consumer(WireIdentifier::numeric(
-                u32::MAX,
-            )));
-        }
-
-        #[test]
-        fn given_named_consumer_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::consumer(
-                WireIdentifier::named("named-é").unwrap(),
-            ));
-        }
-
-        #[test]
-        fn given_numeric_consumer_group_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::consumer_group(
-                WireIdentifier::numeric(u32::MAX),
-            ));
-        }
-
-        #[test]
-        fn given_named_consumer_group_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::consumer_group(
-                WireIdentifier::named("named-é").unwrap(),
-            ));
-        }
-
-        #[test]
-        fn given_numeric_external_group_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::external_group(
-                WireIdentifier::numeric(u32::MAX),
-            ));
-        }
-
-        #[test]
-        fn given_named_external_group_when_peeking_progress_should_match_full_decode() {
-            assert_poll_encodings_peek_matches(&WireConsumer::external_group(
-                WireIdentifier::named("named-é").unwrap(),
-            ));
-        }
-
-        fn assert_poll_encodings_peek_matches(consumer: &WireConsumer) {
-            let identifiers = [
-                WireIdentifier::numeric(u32::MAX),
-                WireIdentifier::named("named-é").unwrap(),
-            ];
-            for stream_id in &identifiers {
-                for topic_id in &identifiers {
-                    for strategy in [
-                        WirePollingStrategy::offset(0),
-                        WirePollingStrategy::offset(u64::MAX),
-                        WirePollingStrategy::timestamp(u64::MAX),
-                        WirePollingStrategy::first(),
-                        WirePollingStrategy::last(),
-                        WirePollingStrategy::next(),
-                    ] {
-                        for partition_id in [None, Some(u32::MAX)] {
-                            for auto_commit in [false, true] {
-                                for count in [0, u32::MAX] {
-                                    let request = PollMessagesRequest {
-                                        consumer: consumer.clone(),
-                                        stream_id: stream_id.clone(),
-                                        topic_id: topic_id.clone(),
-                                        partition_id,
-                                        strategy: strategy.clone(),
-                                        count,
-                                        auto_commit,
-                                    };
-                                    let mut bytes = request.to_bytes().to_vec();
-                                    assert_eq!(
-                                        PollMessagesRequest::decode_from(&bytes).unwrap(),
-                                        request
-                                    );
-                                    for end in 0..=bytes.len() {
-                                        assert_progress_peek_matches(&bytes[..end]);
-                                    }
-                                    bytes.extend_from_slice(b"trailing\0\xff");
-                                    assert_progress_peek_matches(&bytes);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    mod progress_peek_mutations {
-        use super::*;
-
-        #[test]
-        fn given_mutated_consumer_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Consumer);
-        }
-
-        #[test]
-        fn given_mutated_stream_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Stream);
-        }
-
-        #[test]
-        fn given_mutated_topic_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Topic);
-        }
-
-        #[test]
-        fn given_mutated_partition_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Partition);
-        }
-
-        #[test]
-        fn given_mutated_strategy_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Strategy);
-        }
-
-        #[test]
-        fn given_mutated_count_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::Count);
-        }
-
-        #[test]
-        fn given_mutated_auto_commit_when_peeking_progress_should_match_full_decode() {
-            assert_mutated_poll_field_peek_matches(PollField::AutoCommit);
-        }
-
-        #[derive(Clone, Copy)]
-        enum PollField {
-            Consumer,
-            Stream,
-            Topic,
-            Partition,
-            Strategy,
-            Count,
-            AutoCommit,
-        }
-
-        fn assert_mutated_poll_field_peek_matches(field: PollField) {
-            for identifier in [
-                WireIdentifier::numeric(1),
-                WireIdentifier::named("café").unwrap(),
-            ] {
-                let request = PollMessagesRequest {
-                    consumer: WireConsumer::consumer(identifier.clone()),
-                    stream_id: identifier.clone(),
-                    topic_id: identifier,
-                    partition_id: Some(0),
-                    strategy: WirePollingStrategy::offset(0),
-                    count: 0,
-                    auto_commit: false,
-                };
-                let mut bytes = request.to_bytes().to_vec();
-                let consumer_end = request.consumer.encoded_size();
-                let stream_end = consumer_end + request.stream_id.encoded_size();
-                let topic_end = stream_end + request.topic_id.encoded_size();
-                let partition_end = topic_end + PARTITION_FLAG_SIZE + PARTITION_VALUE_SIZE;
-                let strategy_end = partition_end + STRATEGY_SIZE;
-                let count_end = strategy_end + COUNT_SIZE;
-                let offsets = match field {
-                    PollField::Consumer => 0..consumer_end,
-                    PollField::Stream => consumer_end..stream_end,
-                    PollField::Topic => stream_end..topic_end,
-                    PollField::Partition => topic_end..partition_end,
-                    PollField::Strategy => partition_end..strategy_end,
-                    PollField::Count => strategy_end..count_end,
-                    PollField::AutoCommit => count_end..bytes.len(),
-                };
-                for offset in offsets {
-                    let original = bytes[offset];
-                    for value in u8::MIN..=u8::MAX {
-                        bytes[offset] = value;
-                        assert_progress_peek_matches(&bytes);
-                    }
-                    bytes[offset] = original;
-                }
-            }
-        }
-    }
-
-    fn assert_progress_peek_matches(bytes: &[u8]) {
-        let decoded = PollMessagesRequest::decode_from(bytes)
-            .map(|request| (request.strategy, request.auto_commit));
-        assert_eq!(
-            PollMessagesRequest::peek_progress(bytes),
-            decoded,
-            "{bytes:?}"
-        );
-    }
-
     #[test]
     fn roundtrip_with_partition() {
         let req = PollMessagesRequest {