Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace random test values by discrete ones #23956

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ges1227
Copy link

@ges1227 ges1227 commented Nov 6, 2024

Description

Adds TestMode.java to parameterize tests with an arbitrary value and an upper-/lower-bounded value.

Used upper and lower bounds of the previously used Random.getInt()/Random.getLong() functions. Although before the lower bound with Random.getInt()/Random.getLong() was 0 it was lowered to the most negative values for the datatype where possible.

com/facebook/presto/parquet/batchreader/decoders/TestParquetUtils.java the valueString in line112 was randomly chosen. This might deserve more attention on code review.

Motivation and Context

The use of Random() function in the parquet.batchreader.decoders tests may cause flakiness.
Resolves: #23840

Impact

Developer level: Reduced flakiness in test.

Test Plan

CI should run.

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

The use of Random() function in the parquet.batchreader.decoders tests may cause flakiness.

Adds TestMode.java to parameterize tests with an arbitrary value and an upper-/lower-bounded value.

Resolves: prestodb#23840
@ges1227 ges1227 requested review from shangxinli and a team as code owners November 6, 2024 04:46
Copy link

linux-foundation-easycla bot commented Nov 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

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.

[parquet] Use deterministic data in parquet.batchreader.decoders.TestValuesDecoders
1 participant