-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Checked other resources
- I added a very descriptive title to this issue.
- I searched the LangChain.js documentation with the integrated search.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain.js rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
cd ~/langchainjs
yarn
cd langchain-core
yarn build
cd ..
yarn build
cd ~/langchainjs/libs/langchain-mongodb
yarn test:single src/tests...
Error Message and Stack Trace (if applicable)
Error: Jest: Got error running globalSetup - /home/yasharf/langchainjs/libs/langchain-mongodb/src/tests/setup.ts, reason: Could not find a working container runtime strategy
at getContainerRuntimeClient (/home/yasharf/langchainjs/node_modules/testcontainers/build/container-runtime/clients/client.js:66:11)
at async GenericContainer.start (/home/yasharf/langchainjs/node_modules/testcontainers/build/generic-container/generic-container.js:58:24)
at async setup (/home/yasharf/langchainjs/libs/langchain-mongodb/src/tests/setup.ts:65:23)
at async /home/yasharf/langchainjs/node_modules/@jest/core/build/runGlobalHook.js:109:13
at async waitForPromiseWithCleanup (/home/yasharf/langchainjs/node_modules/@jest/transform/build/ScriptTransformer.js:160:5)
at async ScriptTransformer.requireAndTranspileModule (/home/yasharf/langchainjs/node_modules/@jest/transform/build/ScriptTransformer.js:808:16)
at async runGlobalHook (/home/yasharf/langchainjs/node_modules/@jest/core/build/runGlobalHook.js:101:9)
at async runJest (/home/yasharf/langchainjs/node_modules/@jest/core/build/runJest.js:327:5)
at async _run10000 (/home/yasharf/langchainjs/node_modules/@jest/core/build/cli/index.js:343:7)
at async runCLI (/home/yasharf/langchainjs/node_modules/@jest/core/build/cli/index.js:198:3)
Description
The recent PR #8295 for adding more comprehensive MongoDB testing breaks the ability to do integration tests locally without Docker.
@baileympearson @hntrl I am totally onboard with having more comprehensive testing. However, the prior tests had the flexibility to use a container or an actual DB instance outside of a container for testing. With the current setup with the recent PR devs that don't have Docker won't be able to run the tests, and contribute to potential bug fixes or expanding features. Can we have a hybrid test setup that can handle both dev setups like before this PR? Let me know if I can help.
I ran into the issue because the tests I had with #8251 were working last week and now they are broken. So need to figure out a way forward.
System Info
Langchain version: HEAD @ commit 511e473, test(mongodb): add more comprehensive testing to MongoDB integration (#8295)
$ node -v
v22.16.0
WSL Ubuntu 22.04.1 LTS