Skip to content

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Jan 8, 2026

  • Resolves: #

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

@joshtrichards joshtrichards added bug 3. to review Waiting for reviews tests Related to tests labels Jan 8, 2026
@joshtrichards joshtrichards added this to the Nextcloud 33 milestone Jan 8, 2026
@joshtrichards
Copy link
Member Author

/backport to stable32

@joshtrichards joshtrichards marked this pull request as ready for review January 8, 2026 15:52
@joshtrichards joshtrichards requested a review from a team as a code owner January 8, 2026 15:52
@joshtrichards joshtrichards requested review from ArtificialOwl, come-nc, icewind1991 and provokateurin and removed request for a team January 8, 2026 15:52
@nextcloud-bot nextcloud-bot mentioned this pull request Jan 9, 2026
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

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?

@joshtrichards
Copy link
Member Author

@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.

public function getUser() {
$user = parent::getUser();
$this->users[] = $user;
return $user;

protected function tearDown(): void {
if (!isset($this->users)) {
return;
}
foreach ($this->users as $user) {
$this->backend->deleteUser($user);
}
parent::tearDown();
}

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Alright, this wasn't clear from just looking at the diff 👍

@nextcloud-bot nextcloud-bot mentioned this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request bug tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants