-
Notifications
You must be signed in to change notification settings - Fork 255
test(server): add API tests for message retrieval #2537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
test(server): add API tests for message retrieval #2537
Conversation
|
hi, tests that you added are OK but that wasn't the goal. you didn't do that. if you have any questions please ask on discord. |
core/integration/tests/server/scenarios/consumer_timestamp_polling_scenario.rs
Outdated
Show resolved
Hide resolved
|
@hubcio I re-read the issue
Is this correct? |
|
The tests you added are functional and work correctly, but they don't address the core goal of #1657. Let me clarify what's needed. The existing internal tests (
Your PR uses fixed hardcoded values ( What's needed:
Keep in mind that if you do it one-to-one, we'll spawn hundreds of iggy servers and the test time would be in hours, so you have to optimize it (reuse iggy-servers across multiple testcases). Let me know if you have questions, happy to help on Discord. |
5a239b9 to
a7ac6b4
Compare
|
@hubcio |
core/integration/tests/server/scenarios/consumer_timestamp_polling_scenario.rs
Outdated
Show resolved
Hide resolved
core/integration/tests/server/scenarios/get_messages_by_offset_api.rs
Outdated
Show resolved
Hide resolved
|
Have you joined our discord? |
|
@hubcio Yes, I'm already on Discord. |
Add 6 new API tests for message retrieval to consumer_timestamp_polling_scenario: - test_offset_from_middle: poll from middle offset - test_offset_beyond_end: poll beyond last offset returns empty - test_timestamp_from_middle: poll from middle timestamp - test_timestamp_future: poll with future timestamp returns empty - test_message_content_verification: verify message ID and payload - test_message_headers_verification: verify user headers Closes apache#1657 Signed-off-by: seokjin0414 <[email protected]>
- Add get_messages_by_offset_api.rs for offset-based polling tests - Add get_messages_by_timestamp_api.rs for timestamp-based polling tests - Add message_retrieval.rs with test_matrix (72 test combinations) - Remove consumer_timestamp_polling_scenario.rs (replaced by new tests) - Cover 432 parameter combinations per polling strategy via server reuse Closes apache#1657 Signed-off-by: seokjin0414 <[email protected]> Signed-off-by: shin <[email protected]>
Restore the scenario file that was incorrectly removed. This test covers high-level consumer polling strategies and is unrelated to the message retrieval API tests. Signed-off-by: shin <[email protected]>
c68aff0 to
f3f8e9f
Compare
Signed-off-by: shin <[email protected]>
f3f8e9f to
37204fe
Compare
Summary
Test Coverage
Note: Parameter Values
SDK API tests use different parameter values than internal tests due to server validation requirements (
segment_sizemust be multiple of 512,msgs_req_to_savemin 32 and multiple of 32).Internal tests bypass validation by creating
SystemConfigdirectly. SDK API tests start real server processes, so validation is mandatory.Closes #1657