Skip to content

Commit 38e7ec2

Browse files
committed
fix: minimize flakiness of a log test
1 parent 14e1a12 commit 38e7ec2

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

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

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,23 +1868,26 @@ describe('e2e', function () {
18681868
const newLogId = shell.logId;
18691869
expect(newLogId).not.null;
18701870
expect(oldLogId).equals(newLogId);
1871-
log = await readLogFile();
18721871

1873-
expect(
1874-
log.filter(
1875-
(logEntry) => logEntry.attr?.input === 'print(111 + 222)'
1876-
)
1877-
).to.have.lengthOf(1);
1878-
expect(
1879-
log.filter(
1880-
(logEntry) => logEntry.attr?.input === 'print(579 - 123)'
1881-
)
1882-
).to.have.lengthOf(1);
1883-
expect(
1884-
log.filter(
1885-
(logEntry) => logEntry.attr?.input === 'print(123 + 456)'
1886-
)
1887-
).to.have.lengthOf(0);
1872+
await eventually(async () => {
1873+
log = await readLogFile();
1874+
1875+
expect(
1876+
log.filter(
1877+
(logEntry) => logEntry.attr?.input === 'print(111 + 222)'
1878+
)
1879+
).to.have.lengthOf(1);
1880+
expect(
1881+
log.filter(
1882+
(logEntry) => logEntry.attr?.input === 'print(579 - 123)'
1883+
)
1884+
).to.have.lengthOf(1);
1885+
expect(
1886+
log.filter(
1887+
(logEntry) => logEntry.attr?.input === 'print(123 + 456)'
1888+
)
1889+
).to.have.lengthOf(0);
1890+
});
18881891
});
18891892

18901893
it('includes information about the driver version', async function () {

0 commit comments

Comments
 (0)