Coder Social home page Coder Social logo

Comments (4)

dgozman avatar dgozman commented on May 28, 2024 1

@mdmundo Thank you for the repro, illustrates the question nicely!

The difference between the two fixtures is that browser is a worker-scoped fixture, while chromium is a test-scoped fixture.

So, when using the browser fixture:

  • Test successfully finishes.
  • Test-scoped fixtures are successfully teared down.
  • Playwright initiates worker termination, which includes tearing down the browser fixture.
  • Playwright ensures a 30 seconds maximum limit on the worker teardown, and kills the worker process after that. The browser is forcefully closed. Note there is a similar issue #30504 that advocates for a customizable timeout for worker fixture teardown.

When using the chromium fixture:

  • Test successfully finishes.
  • Teardown for test-scoped fixtures is initiated, which includes tearing down the chromium fixture.
  • Since chromium never finishes, Playwright does not consider the test to be finished. Given that you set timeout: 0 in the config, Playwright waits indefinitely for the test to finish.

Given the above, it seems like things work as intended. Let me know what you think.

from playwright.

mdmundo avatar mdmundo commented on May 28, 2024

@dgozman should not it be able to override timeout with this? { scope: "worker", timeout: 0 }

export const test = base.extend({
  browser: [
    ({ browser }, use) => use(browser),
    { scope: "worker", timeout: 0 },
  ],
});

from playwright.

dgozman avatar dgozman commented on May 28, 2024

@mdmundo Yep, this should work once #30504 is fixed. I'll close this issue, since there is no action item for Playwright. Thank you for filing!

from playwright.

mdmundo avatar mdmundo commented on May 28, 2024

@dgozman thanks for the explanation!

from playwright.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.