Skip to content

Conversation

@trushev
Copy link
Contributor

@trushev trushev commented Jan 11, 2023

This PR fixes flaky tests in ITTestHoodieDataSource.
Tests sometimes are failed because they do the check hashMap1.toString().equals(hashMap2.toString()) while hashmap does not guarantee that the order of entries will remain constant over time

Change Logs

Replaced the check hashMap1.toString().equals(hashMap2.toString()) with hashMap1.equals(hashMap2)

Impact

Fixed testParquetComplexTypes and testParquetComplexNestedRowTypes failed with assertion

java.lang.AssertionError: 
Expected: is "[+I[1, [abc1, def1], {abc1=1, def1=3}, +I[1, abc1]], +I[2, [abc2, def2], {def2=3, abc2=1}, +I[2, abc2]], +I[3, [abc3, def3], {def3=3, abc3=1}, +I[3, abc3]]]"
     but: was "[+I[1, [abc1, def1], {def1=3, abc1=1}, +I[1, abc1]], +I[2, [abc2, def2], {def2=3, abc2=1}, +I[2, abc2]], +I[3, [abc3, def3], {def3=3, abc3=1}, +I[3, abc3]]]"

where {abc1=1, def1=3} != {def1=3, abc1=1}

Risk level (write none, low medium or high below)

None

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed


private Row row(Object... args) {
return Row.of(args);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move these utilities to TestData.java ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to TestData

@danny0405 danny0405 self-assigned this Jan 11, 2023
@danny0405 danny0405 added priority:medium Moderate impact; usability gaps flink-sql labels Jan 11, 2023
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit f18e928 into apache:master Jan 12, 2023
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Jan 31, 2023
nsivabalan pushed a commit to nsivabalan/hudi that referenced this pull request Mar 22, 2023
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Moderate impact; usability gaps

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants