Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Several client tests that compare volume/bucket creation time to Instant.now() as of the start of the test failed because now() may include a nanosecond component, while creation time is recorded with millisecond precision only.

this.creationTime = Instant.ofEpochMilli(builder.creationTime);

This is fixed by using Instant.ofEpochMillis to record test start time, too.

https://issues.apache.org/jira/browse/HDDS-10119

How was this patch tested?

Tested locally with Java 17:

$ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 \
  ./hadoop-ozone/dev-support/checks/junit.sh -am -pl :ozone-integration-test -DexcludedGroups=unhealthy \
  -Dtest="TestOzoneAtRestEncryption,TestOzoneClient,TestOzoneRpcClient,TestOzoneRpcClientWithRatis,TestSecureOzoneRpcClient,TestStorageContainerManagerHA"
...
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.681 s -- in org.apache.hadoop.ozone.client.TestOzoneClient
...
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 120.4 s -- in org.apache.hadoop.ozone.scm.TestStorageContainerManagerHA
[INFO] Tests run: 123, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 30.78 s -- in org.apache.hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
[INFO] Tests run: 121, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 50.17 s -- in org.apache.hadoop.ozone.client.rpc.TestOzoneRpcClient
[INFO] Tests run: 31, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 35.50 s -- in org.apache.hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
[INFO] Tests run: 125, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 63.53 s -- in org.apache.hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis

Regular CI (with Java 8):
https://github.com/adoroszlai/ozone/actions/runs/7538133915

@adoroszlai adoroszlai self-assigned this Jan 16, 2024
Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

LGTM

@adoroszlai adoroszlai merged commit db4e879 into apache:master Jan 17, 2024
@adoroszlai adoroszlai deleted the HDDS-10119 branch January 17, 2024 07:26
@adoroszlai
Copy link
Contributor Author

Thanks @sodonnel for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants