Skip to content

[Server] Bound waitForClockToPass in BaseModelCRUDTest to 5 seconds - #2419

Merged
yili-db merged 1 commit into
unitycatalog:mainfrom
yili-db:stack/clock_deadline
Dec 2, 2026
Merged

yili-db merged 1 commit into
unitycatalog:mainfrom
yili-db:stack/clock_deadline

Conversation

@yili-db

@yili-db yili-db commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

🥞 Stacked PR

Use this link to review incremental changes.


  • BaseModelCRUDTest.waitForClockToPass spins until System.currentTimeMillis() passes a timestamp. If the wall clock steps backwards (for example an NTP correction), it spins until the CI job times out, with no hint of why.
    • It now fails after 5s, naming the timestamp; the deadline uses System.nanoTime(), which does not step.
  • Split out of [Server] Give EventLoopStallTest room on slow machines #2330 at review, to keep that PR to EventLoopStallTest.

Tested with SdkModelCRUDTest and CliModelCRUDTest.

Signed-off-by: Yi Li [email protected]

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

This pull request and its description were written by Isaac.

- Fail after 5s instead of spinning forever if the wall clock steps backwards.
- Split out of unitycatalog#2330 at review.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Yi Li <[email protected]>

@timothyw553 timothyw553 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

yili-db added a commit that referenced this pull request Dec 2, 2026
## 🥞 Stacked PR
Use this
[link](https://github.com/unitycatalog/unitycatalog/pull/2330/files) to
review incremental changes.
-
[stack/test_timeouts](#2330)
[[Files
changed](https://github.com/unitycatalog/unitycatalog/pull/2330/files)]

---------
-
`EventLoopStallTest.stopWaitsForBlockedRequestAndExecutorRemainsActive`
failed in CI because the first request took more than 5s to reach its
handler
- Wait up to 30s for things that should happen: a request reaching its
handler, a response, an executor task, the overlapping stream
- Keep the timings that are assertions: the 3s window in which `stop()`
must still be waiting, and the 300ms client timeout that must fire
- Size the timeouts to those waits, on the test servers only (production
defaults are unchanged)
- Each held request raises its own request timeout
(`ServiceRequestContext.setRequestTimeout`) above Armeria's 10s default,
which would otherwise fail it with a 500
  - The clients' response timeout matches it
- The shutdown test sets `server.shutdown-timeout` to 30s, as
`UnityCatalogServerShutdownTest` does, instead of relying on the 5s
default

Moved out of #2167 at review, to keep that PR to its test-isolation
fixes. The `waitForClockToPass` deadline moved on to #2419.

Signed-off-by: Yi Li <[email protected]>

**PR Checklist**

- [x] A description of the changes is added to the description of this
PR.
- [ ] If there is a related issue, make sure it is linked to this PR.
- [ ] If you've fixed a bug or added code that should be tested, add
tests!
- [ ] If you've added or modified a feature, documentation in `docs` is
updated

**Description of changes**

<!-- Please state what you've changed and how it might affect the users.
-->

This pull request and its description were written by Isaac.

---------

Signed-off-by: Yi Li <[email protected]>
Co-authored-by: Isaac <[email protected]>
@yili-db
yili-db merged commit d172bc2 into unitycatalog:main Dec 2, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants