test(integ-test): stabilize stream-order commands across shards - #5729
test(integ-test): stabilize stream-order commands across shards#5729mengweieric wants to merge 4 commits into
Conversation
PR Reviewer Guide 🔍(Review updated until commit 42b7e37)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to b558d05 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit bbe59ba
Suggestions up to commit edc0d81
|
|
Persistent review updated to latest commit bbe59ba |
|
@penghuo The two review points are addressed at the current head: the Dashboard Patterns sample now uses deterministic |
|
Persistent review updated to latest commit b558d05 |
Use deterministic streams for exact order-sensitive semantics and membership/cardinality assertions for representative selection. Preserve real multi-shard property coverage without changing production behavior. Signed-off-by: Eric Wei <menwe@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
Address review feedback on the multi-shard stream-order stabilization: use max(content) for the dashboard patterns sample and assert exact rows; sort name, category before dedup KEEPEMPTY to pin exact survivors; add seq-augmented and single-shard fixtures so streamstats/reverse/dedup encounter order is deterministic across shard layouts; assertNotNull on the server lookup. Test-only; no production behavior change. Signed-off-by: Eric Wei <menwe@amazon.com>
…ard fixture testStreamstatsResetWithNullBucket asserts an exact row sequence produced by reset_before/reset_after streamstats. That plan derives both the segment id and the sliding window frame from a global ROW_NUMBER() over the raw scan order, so the result depends on encounter order, and the reset plan cannot be combined with an upstream sort (planner IndexOutOfBounds), which rules out the seq-sort approach used by the sibling WithNull cases. Drive the single-shard fixture so encounter order equals insertion order on any shard layout. Expected rows are unchanged. Test-only; no production behavior change. Signed-off-by: menwe <menwe@amazon.com>
b558d05 to
42b7e37
Compare
|
Persistent review updated to latest commit 42b7e37 |
Summary
Several Streamstats, Reverse, Dedup, and Patterns tests relied on the incidental encounter order of a single-shard index. On multiple shards, the commands returned valid results for a different stream order and the tests asserted different row content.
This change uses deterministic
makeresultsstreams where exact order is part of the test, and membership/cardinality assertions where representative selection is not defined. Real multi-shard index coverage remains through order-independent property checks. Tests that require nullable numeric streams or expose known engine gaps are intentionally unchanged.No production behavior is modified.
Validation
spotlessCheck,compileTestJava, andgit diff --checkpass