test(User): register Backend+DB users for proper cleanup#57438
test(User): register Backend+DB users for proper cleanup#57438joshtrichards wants to merge 4 commits intomasterfrom
Conversation
Signed-off-by: Josh <[email protected]>
Signed-off-by: Josh <[email protected]>
|
/backport to stable32 |
Signed-off-by: Josh <[email protected]>
provokateurin
left a comment
There was a problem hiding this comment.
You're just changing the way the usernames are generated, but they are not cleaned up afterwards like you said in the description.
I assume it still helps because the usernames have a unique prefix which should avoid collisions?
|
@provokateurin Backend's getUser isn't the one used; in the downstream implementations, tracking and cleanup is implemented in their own $this->getUser() implementations/etc. server/tests/lib/User/DatabaseTest.php Lines 32 to 35 in f15d811 server/tests/lib/User/DatabaseTest.php Lines 46 to 54 in f15d811 |
Signed-off-by: Josh <[email protected]>
provokateurin
left a comment
There was a problem hiding this comment.
Alright, this wasn't clear from just looking at the diff 👍
| $name1 = $this->getUser() . 'foobarbaz'; | ||
| $name2 = $this->getUser() . 'bazbarfoo'; | ||
| $name3 = $this->getUser() . 'notme'; | ||
| $name4 = $this->getUser() . 'under_score'; |
There was a problem hiding this comment.
Those users will still not get cleaned up as their ids will not match what’s in $this->users, no?
Summary
Should help further with some flaky test failures. These users weren't being properly registered via getUser in the test scenarios for cleanup/teardown, leading to leaks between tests.
TODO
Checklist
3. to review, feature component)stable32)