DSingh0304 commented on code in PR #3258:
URL: https://github.com/apache/apisix-dashboard/pull/3258#discussion_r2568162767


##########
e2e/tests/services.stream_routes.crud.spec.ts:
##########
@@ -24,6 +24,8 @@ import { expect } from '@playwright/test';
 import { deleteAllServices, postServiceReq } from '@/apis/services';
 import { deleteAllStreamRoutes } from '@/apis/stream_routes';
 
+test.describe.configure({ mode: 'serial' });

Review Comment:
   The CI likely passed before due to a "lucky" execution order where the 
environment was clean. The failures now are caused by **strict Foreign Key 
constraints** in the backend.
   
   If a previous test (or a parallel run) leaves "zombie" Routes or Stream 
Routes attached to a Service, the old 
[deleteAllServices](cci:1://file:///home/deep/Desktop/Code/Organizations/apisix-dashboard/src/apis/services.ts:56:0-76:2)
 would fail to clean up, causing the `beforeAll` hook to crash. The updated 
[deleteAllServices](cci:1://file:///home/deep/Desktop/Code/Organizations/apisix-dashboard/src/apis/services.ts:56:0-76:2)
 fixes this by explicitly removing dependencies first.
   
   The `mode: 'serial'` is added as a safeguard. Since `fullyParallel: true` is 
enabled globally, this ensures that if more tests are added to this file in the 
future, they won't race against each other for the shared `testServiceId`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to