-
Notifications
You must be signed in to change notification settings - Fork 22
[DEV-762] Allow overriding the deadline at the call level while reading events #339
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
[DEV-762] Allow overriding the deadline at the call level while reading events #339
Conversation
* Allows overriding deadline at the call level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the operation type of reading operations from streaming to regular to enable deadline overriding at the call level. This allows users to specify custom deadlines for read operations when making individual calls.
- Removed explicit
OperationKind.Streaming
parameter fromReadStreamOptions
andReadAllOptions
constructors - Added comprehensive test coverage for deadline functionality on read operations
- Updated existing test assertions to follow best practices
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/main/java/io/kurrent/dbclient/ReadStreamOptions.java | Removed streaming operation kind from constructor to allow deadline overriding |
src/main/java/io/kurrent/dbclient/ReadAllOptions.java | Removed streaming operation kind from constructor to allow deadline overriding |
src/test/java/io/kurrent/dbclient/streams/DeadlineTests.java | Added new test methods for read operations with deadlines and improved existing test assertions |
Comments suppressed due to low confidence (2)
src/test/java/io/kurrent/dbclient/streams/DeadlineTests.java:56
- [nitpick] The method call
getDefaultClient()
is inconsistent with other test methods that usegetDatabase().defaultClient()
. Consider using the same pattern for consistency.
KurrentDBClient client = getDefaultClient();
src/test/java/io/kurrent/dbclient/streams/DeadlineTests.java:83
- [nitpick] The method call
getDefaultClient()
is inconsistent with other test methods that usegetDatabase().defaultClient()
. Consider using the same pattern for consistency.
KurrentDBClient client = getDefaultClient();
005af8d
to
cf6b6fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 @w1am Failed to create cherry Pick PR due to error:
RequestError [HttpError]: Resource not accessible by integration
at /home/runner/work/_actions/kurrent-io/Automations/master/cherry-pick-pr-for-label/node_modules/@octokit/request/dist-node/index.js:66:23
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: '403',
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Wed, 06 Aug 2025 08:03:16 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'contents=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'CC10:29EFA0:1C12F4B:42FC15D:68930C44',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4990',
'x-ratelimit-reset': '1754470994',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '10',
'x-xss-protection': '0'
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/kurrent-io/KurrentDB-Client-Java/merges',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.3.2 Node.js/20.19.3 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"base":"cherry-pick-cherry-pick/339/w1am/dev-762-client-ignores-deadline-option-for-readstream-operation-trunk-73d45506-7921-41e2-92ce-ed4cd27ea920","commit_message":"Merge b830e11bd01f8bb46d1714ab4f6600d0520e7444 into cherry-pick-cherry-pick/339/w1am/dev-762-client-ignores-deadline-option-for-readstream-operation-trunk-73d45506-7921-41e2-92ce-ed4cd27ea920 [skip ci]\\n\\n\\nskip-checks: true\\n","head":"b830e11bd01f8bb46d1714ab4f6600d0520e7444"}',
request: { agent: [Agent], hook: [Function: bound bound register] }
},
documentation_url: 'https://docs.github.com/rest/branches/branches#merge-a-branch'
}
🚨👉 Check https://github.com/kurrent-io/KurrentDB-Client-Java/actions/runs/16771143128
* Change operation type of reading to regular * Allows overriding deadline at the call level
Changed operation type of reading to regular to allow overriding deadline at the call level
Fixes: #333