Skip to content

E2E: remove dedicated teardown for LOCAL connections, and allow containers to preexist on startup#3363

Open
Dave Shoup (shouples) wants to merge 2 commits intomainfrom
djs/e2e-harden-local-connection-fixture
Open

E2E: remove dedicated teardown for LOCAL connections, and allow containers to preexist on startup#3363
Dave Shoup (shouples) wants to merge 2 commits intomainfrom
djs/e2e-harden-local-connection-fixture

Conversation

@shouples
Copy link
Copy Markdown
Contributor

@shouples Dave Shoup (shouples) commented Apr 8, 2026

Summary of Changes

Removes the hard requirement that each @local-tagged test needs to handle the full container lifecycle during fixture setup and teardown.

Now we only assert that the Kafka container (and optionally SR container) is available during setup (whether started externally / by another test or the current test) and skips teardown entirely*.

*Maybe we want to add a single after-all hook to try local teardown in a future branch, but isn't necessary here.

Closes #2951

Sample of @local-tagged tests' timing
Before image
After image

Click-testing instructions

  1. Start a local Kafka container (from within/outside the extension, doesn't matter here)
  2. Run @local-tagged tests via:
npx gulp e2e -t "@local"
  1. Expect no early failure state triggering retries
  2. Overall @local test run times should be significantly reduced

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

Copilot AI review requested due to automatic review settings April 8, 2026 18:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Playwright E2E connection fixtures to stop explicitly tearing down LOCAL containers after each test, and instead reuse already-running local containers to make @local test runs more flexible (closes #2951).

Changes:

  • Make setupLocalConnection() idempotent by detecting preexisting LOCAL containers and only starting what’s missing (Kafka always, Schema Registry optionally).
  • Remove teardownLocalConnection() and simplify the connectionItem fixture teardown logic to do nothing for all connection types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/e2e/utils/connections.ts Adjusts local-connection setup logic to reuse preexisting local containers; removes dedicated local teardown helper.
tests/e2e/baseTest.ts Removes per-test teardown switch and relies on idempotent setup + existing extension shutdown behavior.

Comment thread tests/e2e/utils/connections.ts
Comment thread tests/e2e/utils/connections.ts
@shouples Dave Shoup (shouples) marked this pull request as ready for review April 9, 2026 16:49
@shouples Dave Shoup (shouples) requested a review from a team as a code owner April 9, 2026 16:49
@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/e2e-harden-local-connection-fixture branch from 4d77489 to db954a9 Compare April 9, 2026 22:14
@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/e2e-harden-local-connection-fixture branch from db954a9 to 5aeaa51 Compare April 13, 2026 14:43
@sonarqube-confluent
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E: harden LOCAL connection fixture setup

2 participants