yandrey321 opened a new pull request, #12078:
URL: https://github.com/apache/ozone/pull/12078
## What changes were proposed in this pull request?
- **Problem:** `testEndpoint` sometimes fails with `Expecting actual: 0L to
be greater than: 0L` on
`lastCheckpointCreationTimeTaken`. `RDBCheckpointManager.createCheckpoint`
records the flush and checkpoint
time in whole milliseconds. The mini-cluster SCM DB is nearly empty, so on
a fast runner this takes less than
1 ms and the recorded time is 0. 0 is a valid value, so the `> 0` check is
wrong. The streaming-time check
next to it, also in whole milliseconds, can fail the same way.
- **Fix:** Before calling the endpoint, the test sets both timing metrics to
`-1`. Afterwards it checks that both are `>= 0`. The test still fails if the
servlet doesn't update a metric, but a sub-millisecond checkpoint no longer
fails it.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17849
## How was this patch tested?
Unit tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]