Closed bscheshirwork closed 7 years ago
Is that Codeception only error?
Hm.. Yes.
I think it .codecept/src/Codeception/Lib/Connector/Yii2.php
error
public function _before(FunctionalTester $I)
{
Yii::$app->db->close();
Yii::$app->db->beginTransaction();
}
avoid this error
Then it should be reported to https://github.com/Codeception/Codeception/ and fixed there.
What steps will reproduce the problem?
create functional test with
.codecept/src/Codeception/Lib/Connector/Yii2.php
create
backend/tests/functional/CreateUserCest.php
used Yii inner browser https://github.com/bscheshirwork/yii2-app-advanced-rbac/blob/8ab2bfdae8cd30d1b09931aaeb931ce07880b7ab/backend/tests/functional/CreateUserCest.phpcreate nested transaction (MySQL 5.6.35 | 5.7.17 | 8.0.0) just like transactional save
vendor/dektrium/yii2-user/models/User.php
What is the expected result?
created next
_level
savepoint / release last_level
savepointWhat do you get instead?
execute
savepoint
but no executerelease
rise error SQLSTATE[42000]: Syntax error or access violation: 1305 SAVEPOINT LEVEL1 does not existAdditional info
Exaggerating releaseSavepoint raise error https://github.com/yiisoft/yii2/blob/master/framework/db/Transaction.php#L137
yiisoft/yii2 dev-master c586f19 | PHP version | 7.1.3 | Operating system |debian https://github.com/bscheshirwork/docker-yii2-app-advanced-rbac/blob/master/docker-codeception-run/docker-compose.yml