Skip to content

Assert aggregated content in gearman_execute_partition_basic#466

Merged
esabol merged 1 commit into
masterfrom
issue-464-partition-aggregator-order-test
Jul 7, 2026
Merged

Assert aggregated content in gearman_execute_partition_basic#466
esabol merged 1 commit into
masterfrom
issue-464-partition-aggregator-order-test

Conversation

@p-alik

@p-alik p-alik commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • gearman_execute_partition_basic only 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 order cat_aggregator_fn concatenates sub-task results in — reverse-word-order to forward-word-order — without any test catching it.
  • Adds a test_memcmp assertion 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_fn walking task_list), which is a different code path from the client-queue FIFO ordering already covered by tests/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=fifo still passes

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>

@esabol esabol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@esabol
esabol merged commit 7ed24c3 into master Jul 7, 2026
19 checks passed
@esabol
esabol deleted the issue-464-partition-aggregator-order-test branch July 7, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add content assertion to gearman_execute_partition_basic to pin down aggregator result order

2 participants