-
Notifications
You must be signed in to change notification settings - Fork 31
test: Oxygen SDK contract tests #993
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
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
packages/sdk/shopify-oxygen/contract-tests/src/utils/clientPool.ts
Outdated
Show resolved
Hide resolved
de9db3b to
c6e5776
Compare
c6e5776 to
93d37b8
Compare
| console.error(`Error creating client: ${err}`); | ||
| res.status(500); | ||
| res.send(); | ||
| } |
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.
Bug: Initialization errors leave resources unclosed.
If waitForInitialization throws an exception (timeout or error), the catch block doesn't close the client, causing a resource leak. The client was created on line 97 but won't be cleaned up, potentially leaving connections or other resources open.
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.
(I think this doesn't matter in this use-case).
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.
yea it will just memory leak for a second :)
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.
nit: Please add a newline to the end of the file.
This PR will add in contract tests to the Oxygen SDK CI
Note
Adds a new Shopify Oxygen contract test service and updates CI to build/run it and execute the SDK contract tests.
packages/sdk/shopify-oxygen/contract-tests):src/index.ts) with basic endpoints to report capabilities, create/delete clients, and runevaluatecommands via a simpleClientPool(src/utils/clientPool.ts).package.json(tsup build, start),tsconfig.json,tsup.config.ts,.gitignore, helper scriptrun-test-harness.sh.packages/sdk/shopify-oxygen/contract-testsin rootpackage.json..github/workflows/shopify-oxygen.yml):launchdarkly/contract-testsaction against it on port8000with specified skipped suites.Written by Cursor Bugbot for commit df01447. This will update automatically on new commits. Configure here.