Codeception: Yii2 "There is no active transaction" since update from 2.2.5 to 2.2.6

Created on 3 Nov 2016  路  3Comments  路  Source: Codeception/Codeception

What are you trying to achieve?

Running functional test with check for 404.

What do you get instead?

  [PDOException]                  
  There is no active transaction
$I->amOnPage('/xx');
$I->seeResponseCodeIs(404);

Details

  • Codeception version: 2.2.6
  • PHP Version: 7.0
  • Operating System: Linux (Docker)
  • Installation type: Composer
  • Suite configuration:
class_name: FunctionalTester
modules:
    enabled:
        - Filesystem
        - Yii2
    config:
        Yii2:
            configFile: 'codeception/_config/test.php'

If I replace my base Docker image with an older version which had 2.2.5, tests pass.

Yii

Most helpful comment

Add cleanup: false parameter to Yii2 module.

    config:
        Yii2:
            configFile: 'codeception/_config/test.php'
            cleanup: false

Like here: https://github.com/yiisoft/yii2-app-basic/blob/master/codeception.yml

All 3 comments

Add cleanup: false parameter to Yii2 module.

    config:
        Yii2:
            configFile: 'codeception/_config/test.php'
            cleanup: false

Like here: https://github.com/yiisoft/yii2-app-basic/blob/master/codeception.yml

Fixed. Nice!

@DavertMik consistency vs backwards compatibility :)

Was this page helpful?
0 / 5 - 0 ratings