hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[HUDI-7704] Unify test client storage classes with duplicate code

Open wombatu-kun opened this issue 1 year ago • 2 comments

Change Logs

TestHoodieClientOnCopyOnWriteStorage and TestHoodieJavaClientOnCopyOnWriteStorage have a bunch of duplicate code, so i:

  • extracted common code (with some parameterizations) to HoodieWriterClientTestHarness class;
  • removed unused code;
  • moved static assertions-methods to existing separate class Assertions.

I did not add, remove or change subject of any test, I've just refactored these classes to avoid code duplications.

Impact

none

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

none

Documentation Update

none

  • 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

wombatu-kun avatar May 05 '24 12:05 wombatu-kun

cc @the-other-tim-brown for the code reviewing.

danny0405 avatar May 12 '24 01:05 danny0405

I'm tired of resolving conflicts for this PR again and again. Somebody review it and merge, please!

wombatu-kun avatar Jun 03 '24 09:06 wombatu-kun

Just a couple minor nitpicks but the refactor looks good to me

the-other-tim-brown avatar Jun 03 '24 23:06 the-other-tim-brown

CI report:

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

hudi-bot avatar Jun 04 '24 03:06 hudi-bot