test: fix stress tests bots (#32513)

This commit is contained in:
Max Schmitt 2024-09-09 12:52:40 +02:00 committed by GitHub
parent 718bd9b35f
commit ae02331d00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,9 +44,9 @@ test('should not leak fixtures w/o page', async ({}) => {
test('should not leak server-side objects', async ({ page }) => { test('should not leak server-side objects', async ({ page }) => {
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/page').Page)).toBe(1); expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/page').Page)).toBe(1);
// 4 is because v8 heap creates objects for descendant classes, so WKContext, CRContext, FFContext and our context instance. // 4 is because v8 heap creates objects for descendant classes, so WKContext, CRContext, FFContext, BidiBrowserContext and our context instance.
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(4); expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(5);
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(4); expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(5);
}); });
test('should not leak dispatchers after closing page', async ({ context, server }) => { test('should not leak dispatchers after closing page', async ({ context, server }) => {