Skip to content

Commit db857b8

Browse files
committed
move .process()/.sample() prompt inputs and assertions into eventually()
1 parent 263d9cb commit db857b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/e2e-tests/test/e2e-streams.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ describe('e2e Streams', function () {
273273
// inserts the docs into an Atlas collection
274274
const immortalProcessorName = 'immortalProcessor';
275275

276-
shell.writeInputLine(`sp.${immortalProcessorName}.sample()`);
277-
// data from the sample solar stream isn't deterministic, so just assert that
278-
// the processorName field appears in the shell output after sampling
279276
await eventually(
280277
() => {
278+
shell.writeInputLine(`sp.${immortalProcessorName}.sample()`);
279+
// data from the sample solar stream isn't deterministic, so just assert that
280+
// the processorName field appears in the shell output after sampling
281281
shell.assertContainsOutput(
282282
`processorName: '${immortalProcessorName}'`
283283
);
@@ -342,11 +342,11 @@ describe('e2e Streams', function () {
342342

343343
const aggPipeline = [sourceStage, addFieldStage, mergeStage];
344344

345-
shell.writeInputLine(`sp.process(${JSON.stringify(aggPipeline)})`);
346-
// data from the sample solar stream isn't deterministic, so just assert that
347-
// the interactiveId field appears in the shell output after sampling
348345
await eventually(
349346
() => {
347+
shell.writeInputLine(`sp.process(${JSON.stringify(aggPipeline)})`);
348+
// data from the sample solar stream isn't deterministic, so just assert that
349+
// the interactiveId field appears in the shell output after sampling
350350
shell.assertContainsOutput(`interactiveId: '${interactiveId}'`);
351351
},
352352
{ timeout: 45_000 }

0 commit comments

Comments
 (0)