-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(node): Fix flaky postgresjs integration test #20351
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,7 +218,10 @@ describe('postgresjs auto instrumentation', () => { | |
| }; | ||
|
|
||
| await createRunner(__dirname, 'scenario.js') | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
|
Comment on lines
+221
to
+224
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixRemove the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .expect({ event: EXPECTED_ERROR_EVENT }) | ||
| .start() | ||
|
|
@@ -438,7 +441,10 @@ describe('postgresjs auto instrumentation', () => { | |
|
|
||
| await createRunner(__dirname, 'scenario.mjs') | ||
| .withFlags('--import', `${__dirname}/instrument.mjs`) | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .expect({ event: EXPECTED_ERROR_EVENT }) | ||
| .start() | ||
|
|
@@ -532,7 +538,10 @@ describe('postgresjs auto instrumentation', () => { | |
|
|
||
| await createRunner(__dirname, 'scenario-requestHook.js') | ||
| .withFlags('--require', `${__dirname}/instrument-requestHook.cjs`) | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
@@ -625,7 +634,10 @@ describe('postgresjs auto instrumentation', () => { | |
|
|
||
| await createRunner(__dirname, 'scenario-requestHook.mjs') | ||
| .withFlags('--import', `${__dirname}/instrument-requestHook.mjs`) | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
@@ -706,7 +718,10 @@ describe('postgresjs auto instrumentation', () => { | |
| }; | ||
|
|
||
| await createRunner(__dirname, 'scenario-url.cjs') | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
@@ -787,7 +802,10 @@ describe('postgresjs auto instrumentation', () => { | |
|
|
||
| await createRunner(__dirname, 'scenario-url.mjs') | ||
| .withFlags('--import', `${__dirname}/instrument.mjs`) | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
@@ -866,7 +884,10 @@ describe('postgresjs auto instrumentation', () => { | |
| }; | ||
|
|
||
| await createRunner(__dirname, 'scenario-unsafe.cjs') | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
@@ -946,7 +967,10 @@ describe('postgresjs auto instrumentation', () => { | |
|
|
||
| await createRunner(__dirname, 'scenario-unsafe.mjs') | ||
| .withFlags('--import', `${__dirname}/instrument.mjs`) | ||
| .withDockerCompose({ workingDirectory: [__dirname] }) | ||
| .withDockerCompose({ | ||
| workingDirectory: [__dirname], | ||
| readyMatches: ['postgresjs-ready'], | ||
| }) | ||
| .expect({ transaction: EXPECTED_TRANSACTION }) | ||
| .start() | ||
| .completed(); | ||
|
|
||


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.
ready-gateservice missing required Docker healthcheckHigh Severity
The new
ready-gateservice does not define ahealthcheck:. The node-integration-tests runner usesdocker compose up -d --wait, which relies on healthchecks to know when services are ready. Sinceready-gaterunsechoand exits immediately, it will be in an "exited" state when--waitchecks it, potentially causing the command to fail and throwing an error in the runner.Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 9bbdd3c. Configure here.