You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "gitedmond (via GitHub)" <gi...@apache.org> on 2026/09/28 04:25:08 UTC

[PR] test: seed MSQ quantiles sketch for partition tests (druid)

gitedmond opened a new pull request, #20440:
URL: https://github.com/apache/druid/pull/20440

   Fixes #20439.
   
   ### Description
   
   `ClusterByStatisticsCollectorImplTest` fixes the input shuffle order, but the DataSketches `ItemsSketch` also uses a shared random generator when it compacts and merges. Different sketch samples can push a partition outside the test's fixed weight leeway.
   
   Seed the sketch generator before each test method so the existing partition coverage, boundary, and weight assertions run against a repeatable sample. This changes only the test; production partitioning is unchanged. Seed `0L` reproduced the same weight failure for this fixture, so the test uses `1L` after checking the target method and the full class.
   
   ### Verification
   
   - Before the change, with Surefire retries disabled, the target method failed on the second unseeded run: `single collector, random order`, `generatePartitionsWithMaxCount(50)`, partition `#13`, at `verifyPartitionWeights`.
   - After the change, all 15 tests in `ClusterByStatisticsCollectorImplTest` passed with retries disabled.
   - The formerly flaky method passed five additional isolated runs with retries disabled.
   - `git diff --check` passed.
   
   Tests used JDK 25 and Maven 3.9.16 with `-pl multi-stage-query -am`, `-Pskip-static-checks`, and `-Dweb.console.skip=true`.
   
   <hr>
   
   ##### Key changed/added classes in this PR
   
   * `ClusterByStatisticsCollectorImplTest`
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] test: seed MSQ quantiles sketch for partition tests (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 merged PR #20440:
URL: https://github.com/apache/druid/pull/20440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org