Skip to content
Snippets Groups Projects
Commit 21ff0c87 authored by catch's avatar catch
Browse files

Issue #3405976 by alexpott, jrglasgow, fago, catch, mondrake, solideogloria,...

Issue #3405976 by alexpott, jrglasgow, fago, catch, mondrake, solideogloria, mglaman, Driskell, derickr, longwave, Mile23, YesCT, daffie: Transaction autocommit during shutdown relies on unreliable object destruction order (xdebug 3.3+ enabled)
parent 4d9ec8d7
Branches
Tags
8 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest
Pipeline #103867 passed with warnings
Pipeline: drupal

#103905

    Pipeline: drupal

    #103900

      Pipeline: drupal

      #103893

        +6
        ......@@ -896,15 +896,21 @@ public function testTransactionManagerFailureOnPendingStackItems(): void {
        $reflectionProperty = new \ReflectionProperty(TransactionManagerBase::class, 'connectionTransactionState');
        $reflectionProperty->setValue($manager, ClientConnectionTransactionState::Active);
        $this->expectException(\AssertionError::class);
        $this->expectExceptionMessageMatches("/^Transaction .stack was not empty\\. Active stack: bar\\\\qux/");
        // Ensure that __destruct() results in an assertion error. Note that this
        // will normally be called by PHP during the object's destruction but Drupal
        // will commit all transactions when a database is closed thereby making
        // this impossible to test with calling it directly.
        $manager->__destruct();
        // this impossible to test unless it is called directly.
        try {
        $manager->__destruct();
        $this->fail("Expected AssertionError error not thrown");
        }
        catch (\AssertionError $e) {
        $this->assertStringStartsWith('Transaction $stack was not empty. Active stack: bar\\qux', $e->getMessage());
        }
        // Clean up.
        $reflectionProperty = new \ReflectionProperty(TransactionManagerBase::class, 'stack');
        $reflectionProperty->setValue($manager, []);
        unset($testConnection);
        Database::closeConnection('test_fail');
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment