mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-08 04:42:57 +00:00
feat: add overall timeout parameter to remote client (#2550)
## Summary - Adds an overall `timeout` parameter to `TimeoutConfig` that limits the total time for the entire request - Can be set via config or `LANCE_CLIENT_TIMEOUT` environment variable - Exposed in Python and Node.js bindings - Includes comprehensive tests ## Test plan - [x] Unit tests for Rust TimeoutConfig - [x] Integration tests for Python bindings - [x] Integration tests for Node.js bindings - [x] All existing tests pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,28 @@ describe("remote connection", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should accept overall timeout configuration", async () => {
|
||||
await connect("db://test", {
|
||||
apiKey: "fake",
|
||||
clientConfig: {
|
||||
timeoutConfig: { timeout: 30 },
|
||||
},
|
||||
});
|
||||
|
||||
// Test with all timeout parameters
|
||||
await connect("db://test", {
|
||||
apiKey: "fake",
|
||||
clientConfig: {
|
||||
timeoutConfig: {
|
||||
timeout: 60,
|
||||
connectTimeout: 10,
|
||||
readTimeout: 20,
|
||||
poolIdleTimeout: 300,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("should pass down apiKey and userAgent", async () => {
|
||||
await withMockDatabase(
|
||||
(req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user