Skip to content

[stable34] test(files_external): call parent::setUp() in BackendServiceTest - #64307

Open
backportbot[bot] wants to merge 1 commit into
stable34from
backport/64174/stable34
Open

backportbot[bot] wants to merge 1 commit into
stable34from
backport/64174/stable34

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 14, 2026

Copy link
Copy Markdown

Backport of PR #64174

BackendServiceTest overrode setUp() without calling the parent, but
still ran TestCase::tearDown(). For a test outside the DB group that
tearDown re-registers IDBConnection as TestCase::$realDatabase, which
only the parent setUp() initialises. When BackendServiceTest was the
first non-DB test in a run, $realDatabase stayed null and every later
test in the process got a null database connection.

This showed up when running apps/files_external/tests/Service on its
own: 112 of 138 tests errored with "IDBConnection, null given". The
full files_external suite hides it because earlier tests set
$realDatabase first.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@backportbot
backportbot Bot requested a review from a team as a code owner September 14, 2026 11:45
@backportbot
backportbot Bot requested review from Altahrim, CarlSchwan, come-nc, icewind1991, provokateurin, salmart-dev and solracsf and removed request for a team September 14, 2026 11:45
@backportbot backportbot Bot added 3. to review Waiting for reviews tests Related to tests labels Sep 14, 2026
@backportbot backportbot Bot added this to the Nextcloud 34.0.5 milestone Sep 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 tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants