Skip to content

E2E teardown can leave Temporal dev server running after partial setup failure #3915

Description

@zerogravit1

Describe the bug

If E2E global setup partially succeeds and then fails while creating the UI server,
global teardown can throw while cleaning up an uninitialized dependency.

When that happens, later cleanup does not run and the Temporal dev server started
by the test process can remain running after Playwright exits.

To Reproduce

  1. Build the E2E assets normally.

  2. Temporarily move the UI assets so the Go UI server build fails:

    mv server/ui/assets server/ui/assets.bak

  3. Run:

    pnpm test:e2e tests/e2e/schedules.spec.ts --project="chromium desktop"

  4. Observe the UI server build failure.

  5. Observe a secondary teardown error.

  6. Check for the Temporal process / listening ports after the Playwright command exits.

Expected behavior

Teardown should be safe after partial dependency initialization.

The original setup failure should remain visible, and any dependencies that were
successfully started should still be shut down.

Desktop

  • OS: Ubuntu
  • Browser: Chromium via Playwright
  • UI version: 2.54.1

Additional context

In the failing path, the Temporal dev server has already started before UI server
creation fails.

The secondary teardown failure prevents temporal.shutdown() from being reached,
leaving the E2E-started Temporal process listening on ports 7233/7234.

I have a local fix and regression coverage and can open a PR if this approach is acceptable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions