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

Test: hadoopfs tests remove the use of @Value.Immutable #8572

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

Conversation

nopcoder
Copy link
Contributor

test: Add ImmutablePagination to remove the use of Value.Immutable

  • Added ImmutablePagination class to handle pagination parameters in tests.
  • Updated test setup to use ImmutablePagination class for pagination parameters.
  • This change removes the use of @Value.Immutable in the test and works
    with latest Java compilers.

- Added ImmutablePagination class to handle pagination parameters in tests.
- Updated test setup to use ImmutablePagination class for pagination parameters.
- This change removes the use of @Value.Immutable in the test and works
  with latest Java compilers.
@nopcoder nopcoder added area/testing Improvements or additions to tests exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached labels Jan 29, 2025
@nopcoder nopcoder self-assigned this Jan 29, 2025
Copy link

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed

Copy link

E2E Test Results - Quickstart

11 passed

Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

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

Thanks!

But frankly I am not sure why this would be required. E.g. the docs (and even the changelog) say nothing about not working with a modern JVM. Ideally we would link to an issue that says immutable Values don't work with a modern Java. Maybe just bump to 2.10.1? Or are we using it incorrectly???

I am not a fan of writing generated code by hand. For instance the code generated by immutable.Value gives actual value types; the type here does not. "Value type" means, for instance, the existence of working equals and hashCode methods. You also get any number of great routines; see here.

@@ -0,0 +1,56 @@
package io.lakefs;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand: this used to be auto-generated; is this now manually written?

@@ -0,0 +1,56 @@
package io.lakefs;

import com.google.common.base.Optional;
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 use the standard java.util.Optional instead? (Maybe not if code is generated with a different Optional...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I thought the code prefered Google's package so we left it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Improvements or additions to tests exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants