Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2016 at 06:29 UTC
Updated:
29 Mar 2016 at 02:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerThere we go
Comment #3
isntall commentedIn my manual testing this patch works.
Though if there is no existing sqlite db, an error is thrown
ERROR: Missing Simpletest database schema. Either install Simpletest module or use the --sqlite parameter.even though the --sqlite flag is present
This might not be an issue, but the error is miss leading.
The command i used to run the test.
cd /var/www/html && sudo -u www-data /opt/phpenv/shims/php /var/www/html/core/scripts/run-tests.sh --url http://localhost/checkout --dburl mysql://drupaltestbot:drupaltestbotpw@drupaltestbot-db-mysql-5-5/simpletest_1457380647 --color --keep-results --concurrency 1 --keep-results-table --sqlite /var/www/html/results/simpletest.sqlite --types PHPUnit-FunctionalJavascript --allComment #4
dawehnerGood point. What about this then?
Comment #6
MixologicSomething fishy going on here
Comment #7
dawehnerAt was actually just 11pm, one is getting old.
Comment #8
dawehnerComment #9
Mixologicyay. This is looking good.
Comment #10
alexpottWe can achieve the same with slightly less duplication and complexity...
Comment #11
dawehnerAs said on IRC, we could truncate() the table and then not set
$table_exists = FALSEComment #12
alexpott@Mixologic pointed out that @isntall had also worked on a version of the patch but @dawehner was just quicker... ticking the credit box for @isntall.
Comment #13
alexpott@dawehner - yep it is prettier...
Comment #14
dawehnerPerfect
Comment #15
alexpottMissing ->execute() :)
Comment #16
alexpottFixed and started some db testing of truncate over in #2684359: The truncate method is does different things on different databases and depending if in a transaction
Comment #17
isntall commentedThis looks good, and behaves correctly.
My concern from comment #3 have been addressed.
Comment #18
jibranPatch looks fine just on nit.
Can we add a comment above this line to explain the situation?
Comment #19
dawehnerIMHO the code is pretty selfdescriptive already. If we don't want to keep the table and the table exists, we truncate it.
Comment #20
MixologicFYI: this is still a blocker to being able to commit the changes to drupalci.
Comment #21
alexpottGiven that this is for non-runtime code and for DrupalCI and optional too boot I'm happy to commit this to unblock frontend testing on DrupalCI. Committed 5e42677 and pushed to 8.0.x, 8.1.x and 8.2.x. Thanks!
Comment #22
isntall commentedThe new DCI tag has been deployed that takes advantage of this new functionality.
Comment #23
dawehnerYou can see the change in git, but the issue doesn't have a comment mentioning it, weird.