Skip to content

[BUG] Node 20: Test timeouts do not exit gracefully #22641

@gtm-nayan

Description

@gtm-nayan

System info

  • Playwright Version: v1.32.3
  • Operating System: Ubuntu 22
  • Browser: Chromium, Firefox
  • Other info:

Source code

  • I provided exact source code that allows reproducing the issue locally.
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  webServer: {
    command: 'node webserver.js',
    port: 4173,
  },
  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'], },
    },
  ]
});
// webserver.js
import { createServer } from 'node:http';
createServer((req, res) => {}).listen(4173);

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
  await new Promise(r => setTimeout(r, 25000));
});

Steps

  • Run the test

Expected
test failure is reported, webserver is closed

Actual
exits without any message, test remains unmarked, webserver remains open

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions