Codeception / module-yii2

Codeception module for Yii2 framework
MIT License
16 stars 36 forks source link

v 1.1.1 breaks functional tests #14

Closed leealex closed 4 years ago

leealex commented 4 years ago

My tests create some records in DB using AR between tests, but after upgrading to 1.1.1 records being removed after each test. All tests are passing on v. 1.1.0

Naktibalda commented 4 years ago

Try setting transaction: false in module parameters to keep the previous default behaviour:

modules:
    enabled:
        - Yii2:
            transaction: false
leealex commented 4 years ago

Thanks it helped, though it's not obvious behaviour.

SaloEater commented 4 years ago

Hey! There was a mistake in module parameters, when transaction property was false by default. Anyway you have to get in use of transactioned test, because you want to have independent one to have no side effects on your testing enviroment.

leealex commented 4 years ago

Hey! There was a mistake in module parameters, when transaction property was false by default. Anyway you have to get in use of transactioned test, because you want to have independent one to have no side effects on your testing enviroment.

Thank you :)

zebraf1 commented 3 years ago

Hey! There was a mistake in module parameters, when transaction property was false by default. Anyway you have to get in use of transactioned test, because you want to have independent one to have no side effects on your testing enviroment.

Thanks, I had cleanup: false in my Yii2 module configuration (using Yii1 + Yii2 together was causing transaction errors). After upgrading I started to get database locks which would never release during fixture loading. This issue was resolved by adding transaction: false to Yii2 module configuration.

Thanks @SaloEater and @Naktibalda