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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to