Assert aggregated content in gearman_execute_partition_basic#466
Merged
Conversation
gearman_execute_partition_basic only checked the aggregated result size (18 bytes), so the reduce-step ordering change from PR #435 (cat_aggregator_fn now walks the task list in FIFO/submission order instead of LIFO) could silently flip word order without failing any test. Pin the concatenation order down explicitly. Fixes #464 Signed-off-by: Alexei Pastuchov <info@maximka.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gearman_execute_partition_basiconly asserted the aggregated result size (18 bytes), never its content, so PR Issues #319 and #395: Change client task list to FIFO order #435's ordering change (client task queue LIFO → FIFO) could silently flip the ordercat_aggregator_fnconcatenates sub-task results in — reverse-word-order to forward-word-order — without any test catching it.test_memcmpassertion pinning the aggregated result to"thisdogdoesnothunt", the expected FIFO/submission order.As discussed on #464: this specifically covers the aggregator's reduce-order dependency (
cat_aggregator_fnwalkingtask_list), which is a different code path from the client-queue FIFO ordering already covered bytests/libgearman-1.0/fifo.cc. The two tests are complementary, not redundant — neither previously exercised the other's path.Fixes #464
Test plan
./t/client --collection='gearman_execute_partition()'passes./t/client --collection=fifostill passes