-
Notifications
You must be signed in to change notification settings - Fork 75
test: add success e2e tests for stream processing commands MONGOSH-2127 #2459
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
base: main
Are you sure you want to change the base?
Conversation
9c21f46
to
9ba0d55
Compare
welp, tests are just failing now because dev is having issues. I'll restart the tasks later once that's sorted |
Ok from a bit more testing, it seems like bumping the timeout for |
Yeah, this seems like it would be fine to apply this locally here – is it expected that |
Beyond network latency, it should return fairly quickly with the |
(merged main to fix some CI failures) |
This failure seems relevant: [2025/06/12 16:12:43.345] 1) should output streamed documents to the shell
[2025/06/12 16:12:43.346] 2025-06-12T14:11:20.448Z mongodb-runner stopped running process
[2025/06/12 16:12:43.347] {
[2025/06/12 16:12:43.347] pid: 52381,
[2025/06/12 16:12:43.347] output: 'Current Mongosh Log ID:\t684ae02c024d3aee875be8e0\n' +
[2025/06/12 16:12:43.347] 'Connecting to:\t\tmongodb://<credentials>@atlas-stream-67ec5d03a32c2e2a2d533eaa-5ml8o.virginia-usa.a.query.mongodb-dev.net/?directConnection=true&tls=true&appName=<REDACTED:notary_signing_key_name>+2.5.1\n' +
[2025/06/12 16:12:43.347] 'Using MongoDB:\t\tAtlas Stream Processing\n' +
[2025/06/12 16:12:43.347] 'Using Mongosh:\t\t2.5.1\n' +
[2025/06/12 16:12:43.347] '\n' +
[2025/06/12 16:12:43.347] 'For <REDACTED:notary_signing_key_name> info see: https://www.mongodb.com/docs/mongodb-shell/\n' +
[2025/06/12 16:12:43.347] '\n' +
[2025/06/12 16:12:43.347] 'AtlasStreamProcessing> Uncaught \rMongoServerError[CommandFailed]: Failed to sample stream processor results: Unable to retrieve sample for stream processor, correlationID = 18485100615bb36826147230\n' +
[2025/06/12 16:12:43.347] 'AtlasStreamProcessing> ',
[2025/06/12 16:12:43.347] rawOutput: 'Current Mongosh Log ID:\t684ae02c024d3aee875be8e0\n' +
[2025/06/12 16:12:43.347] 'Connecting to:\t\tmongodb://<credentials>@atlas-stream-67ec5d03a32c2e2a2d533eaa-5ml8o.virginia-usa.a.query.mongodb-dev.net/?directConnection=true&tls=true&appName=<REDACTED:notary_signing_key_name>+2.5.1\n' +
[2025/06/12 16:12:43.347] 'Using MongoDB:\t\tAtlas Stream Processing\n' +
[2025/06/12 16:12:43.347] 'Using Mongosh:\t\t2.5.1\n' +
[2025/06/12 16:12:43.347] '\n' +
[2025/06/12 16:12:43.348] 'For <REDACTED:notary_signing_key_name> info see: https://www.mongodb.com/docs/mongodb-shell/\n' +
[2025/06/12 16:12:43.348] '\n' +
[2025/06/12 16:12:43.348] 'AtlasStreamProcessing> Uncaught \rMongoServerError[CommandFailed]: Failed to sample stream processor results: Unable to retrieve sample for stream processor, correlationID = 18485100615bb36826147230\n' +
[2025/06/12 16:12:43.348] 'AtlasStreamProcessing> ',
[2025/06/12 16:12:43.348] exitCode: null,
[2025/06/12 16:12:43.348] signal: null
[2025/06/12 16:12:43.348] }
// [...]
[2025/06/12 16:14:52.560] 1) e2e Streams
[2025/06/12 16:14:52.560] sampling from a running stream processor
[2025/06/12 16:14:52.560] should output streamed documents to the shell:
[2025/06/12 16:14:52.560] [Timed out 45000ms] Expected shell output to include "processorName: 'immortalProcessor'"
[2025/06/12 16:14:52.560] + expected - actual
[2025/06/12 16:14:52.560] -Current Mongosh Log ID: 684ae02c024d3aee875be8e0
[2025/06/12 16:14:52.560] -Connecting to: mongodb://<credentials>@atlas-stream-67ec5d03a32c2e2a2d533eaa-5ml8o.virginia-usa.a.query.mongodb-dev.net/?directConnection=true&tls=true&appName=<REDACTED:notary_signing_key_name>+2.5.1
[2025/06/12 16:14:52.560] -Using MongoDB: Atlas Stream Processing
[2025/06/12 16:14:52.560] -Using Mongosh: 2.5.1
[2025/06/12 16:14:52.560] -
[2025/06/12 16:14:52.560] -For <REDACTED:notary_signing_key_name> info see: https://www.mongodb.com/docs/mongodb-shell/
[2025/06/12 16:14:52.560] -
[2025/06/12 16:14:52.560] -AtlasStreamProcessing> Uncaught
MongoServerError[CommandFailed]: Failed to sample stream processor results: Unable to retrieve sample for stream processor, correlationID = 18485100615bb36826147230
[2025/06/12 16:14:52.560] -AtlasStreamProcessing>
[2025/06/12 16:14:52.560] +processorName: 'immortalProcessor'
[2025/06/12 16:14:52.560]
[2025/06/12 16:14:52.560] AssertionError [ERR_ASSERTION]: Expected shell output to include "processorName: 'immortalProcessor'"
[2025/06/12 16:14:52.560] at new AssertionError (node:internal/assert/assertion_error:454:5)
[2025/06/12 16:14:52.561] at TestShell.assertContainsOutput (test/test-shell.ts:330:13)
[2025/06/12 16:14:52.561] at timeout (test/e2e-streams.spec.ts:281:17)
[2025/06/12 16:14:52.561] at eventually (/Users/ec2-user/data/mci/867028ca06665cdc9f8e3263e2c8994b/src/testing/eventually.ts:18:13)
[2025/06/12 16:14:52.561] at async Context.<anonymous> (test/e2e-streams.spec.ts:279:7) |
Going to open this up early since I'm running into flakiness on Evergreen and I'm not entirely sure how to resolve it. The error I see coming up most frequently is something like
which, when referring to this call, implies that the command either didn't run at all or it took too long to return a response? I'm not able to repro the failure when running the test locally, so I'm wondering if you have any ideas on how to proceed