villebro commented on PR #43689:
URL: https://github.com/apache/superset/pull/43689#issuecomment-5470016992

   Root-caused and fixed `test_related_subscribers_scoped_to_visible_tasks` in 
17ea87bb2d — it was a real, deterministic test bug, not pollution.
   
   The captured log confirmed the fixture auto-subscribes admin to its tasks 
(`Added subscriber 1 to task 1..5`), yet admin got `{2}` (gamma only). The 
cause: this is the **only** task-API test that switches users **within a single 
test method** (`login(GAMMA)` then `login(ADMIN)`). The shared test client 
keeps one session, and `login()` just `POST /login/`, which — when a user is 
already authenticated — **redirects without re-authenticating** (the `Invalid 
redirect detected` warning), so admin’s request ran with gamma’s scoping and 
`/related/subscribers` returned only gamma. Every other test logs in once, so 
none hit this.
   
   Fix: `self.logout()` before each login so the admin switch takes effect. No 
product-code change; the endpoint/scoping logic was correct.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to