Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: PDO Exceptions when running single tests after #3224 #5202

Closed
indigoxela opened this issue Sep 6, 2021 · 12 comments
Closed

Regression: PDO Exceptions when running single tests after #3224 #5202

indigoxela opened this issue Sep 6, 2021 · 12 comments

Comments

@indigoxela
Copy link
Member

indigoxela commented Sep 6, 2021

Description of the bug

When trying to run a single test (verified with several local and a tugboat instance), it ends up in a fatal error:

ERROR: exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.simpletest512782semaphore' doesn't exist' in ...core/includes/database/database.inc:2284

Different tables, but it always ends up with "Base table or view not found".

Commenting out line 296 in core/includes/config.inc brings back Simpletest functionality. module_invoke_all('config_create', $config);

Steps To Reproduce

  • Enable the locale module
  • Try to run a single test - command line or interface in the preview-release or latest dev.

Actual behavior

End up with a PDO Exception

Additional information

That change is pretty new and not released yet. It's in the 1.20 milestone.

backdrop/backdrop#3695

@indigoxela
Copy link
Member Author

indigoxela commented Sep 6, 2021

Not all tests are affected, but for sure a lot more failures, if the locale module is enabled. Still investigating.

Another finding: running tests with --directory core/modules/whatever also seems broken.

PHP version doesn't seem to matter, I tried with 7.4 and 5.6.

Here's an example error from a tugboat instance, which did not have the locale module enabled:

EXCEPTION: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tugboat.simpletest229995cache_bootstrap' doesn't exist: DELETE FROM {cache_bootstrap} WHERE (`cid` = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => variables ) in BackdropWebTestCase->refreshVariables() (line 1837 of /var/lib/tugboat/core/modules/simpletest/backdrop_web_test_case.php).

@docwilmot
Copy link
Contributor

docwilmot: I tried running Comment Interface Test on the BackdropCMS.org tugboat demo site, and that also crashed, but the site is running 1.19.3. So maybe this is more than one problem actually.

docwilmot: I didnt get any Exception errors or useful messages, just a test failed and Undefined property: BackdropWebTestCaseCache::$originalLanguageDefault in the logs.

docwilmot: This is with and without locale enabled

@klonos
Copy link
Member

klonos commented Sep 6, 2021

@docwilmot the Undefined property: BackdropWebTestCaseCache::$originalLanguageDefault thing should be #4679.

@docwilmot
Copy link
Contributor

OK, so definitely two things, but can you confirm, running that test in the demo, now, leads to an AJAX error. Just curious.

@klonos
Copy link
Member

klonos commented Sep 6, 2021

...can you confirm, running that test in the demo, now, leads to an AJAX error.

Confirmed 👍🏼 (separate issue though)

@indigoxela
Copy link
Member Author

Bear with me, wild guessing again...

Maybe the execution of hook_config_create() slows down the table-copy-job of Simpletest? So it might be sort of a race condition somewhere?

@hosef
Copy link

hosef commented Sep 7, 2021

Maybe the execution of hook_config_create() slows down the table-copy-job of Simpletest?

I don't think that would affect this. The hooks should only be run on the initial install, which happens before the first test is run.

@indigoxela
Copy link
Member Author

The hooks should only be run on the initial install, which happens before the first test is run.

Hm, are you sure? Many setUp() functions install additional modules - core modules or specific testing modules. To my understanding this happens when setting up the individual test, correct me if I'm wrong.

@hosef
Copy link

hosef commented Sep 8, 2021

That is true, but that doesn't happen until after the tables are all copied.

@hosef hosef modified the milestone: eD3skt0p Sep 8, 2021
@indigoxela
Copy link
Member Author

indigoxela commented Sep 27, 2021

Unfortunately this regression breaks i18n tests

Obviously that modules requires locale to be on.

indigoxela added a commit to backdrop-contrib/i18n that referenced this issue Sep 27, 2021
@indigoxela
Copy link
Member Author

Wait, no, false alert. It wasn't this problem causing the failures, but just the recent button text changes. All good, sorry for the noise.

@indigoxela
Copy link
Member Author

Whatever broke, I'm not able to reproduce it anymore. Closing as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants