Fix Playwright tests failing when run together#1906
Conversation
The issue was that ProtocolTest and PageActionsLiveTest both extended AbstractProtocolTest and shared the same static Jetty server instance. When running tests together, the server would be stopped by one test class before the other could use it, causing ERR_CONNECTION_REFUSED errors. This fix creates a new BasePlaywrightTest class specifically for the Playwright module that gives each test class its own isolated server instance. Changes: - Created BasePlaywrightTest with proper server management - Updated ProtocolTest to extend BasePlaywrightTest - Updated PageActionsLiveTest to extend BasePlaywrightTest - Removed redundant getHandlers() overrides Fixes: #issue-number (if applicable) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Signed-off-by: Julien Nioche <julien@digitalpebble.com>
|
something needs fixing - ignore this PR for now |
|
If you don't mind @jnioche , I finished your PR by reverting 90% of it. :) |
thanks @sigee apologies for the half baked PR, I was evaluating Mistral's vibe tool and thought I would try it on a simple PR. Meant to have a closer look at it but you beat me to it. |
The issue was that ProtocolTest and PageActionsLiveTest both extended AbstractProtocolTest and shared the same static Jetty server instance. When running tests together, the server would be stopped by one test class before the other could use it, causing ERR_CONNECTION_REFUSED errors.
This fix creates a new BasePlaywrightTest class specifically for the Playwright module that gives each test class its own isolated server instance.
Changes:
Testing
• Ran full test suite: mvn test -pl external/playwright - PASS
• Ran individual tests: mvn test -pl external/playwright -Dtest=PageActionsLiveTest - PASS
• Ran individual tests: mvn test -pl external/playwright -Dtest=ProtocolTest - PASS