Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Sep 2015 at 20:15 UTC
Updated:
26 Sep 2015 at 07:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottI've fixed the old KernelTestBase and tested WebTestBase and KernelTestBase(tng) and they both pass if they are the first test.
Reverting #1031122: postgres changeField() is unable to convert to bytea column type correctly fixes this - I don't think we should revert that because it was critical. I'm not sure why DrupalCI tests did not fail in that issue - that needs investigation too.
Comment #3
alexpottSo in the last green run on #1031122: postgres changeField() is unable to convert to bytea column type correctly - https://dispatcher.drupalci.org/job/default/12472/consoleFull - this test does not appear in the output. I suspect a DrupalCI bug fix.
Comment #4
mradcliffeI think that test is run, and it passed on DrupalCI. The order of test results is not guaranteed because of concurrency > 1.
Comment #5
MixologicI ran this test all by itself and it fails:
https://dispatcher.drupalci.org/job/DCI_XML/100/
This isn't an issue with drupalci - they do fail if its the first test. The issue is that there is a totally random order to run-tests.sh every time.
This test just happens to pass when some other test has already paved the database way for it.
Comment #6
xjmBut then why did the test never run in https://dispatcher.drupalci.org/job/default/12472/consoleFull (per @alexpott)? That would point at a problem in test discovery.
Edit: Or is the idea that the test did actually run and that comment was erroneous? It does actually seem to be listed on that page.
Comment #7
alexpottAlexpott-- I can't find stuff on a webpage. If a webtestbase was first it would then pass cause the db would be fine.
Comment #8
dawehnerThis feels potentially fragile. Can't we call $connection->close(); $connection = Database::getConnection() or something like that?
Comment #9
Mixologic@alexpott: to be fair, Drupal\aggregator\Tests\Views\AggregatorItemViewsFieldAccessTest is too long to show up in run-tests.sh default columnar output, so it gets cut off at Drupal\aggregator\Tests\Views\AggregatorItemViewsFieldAccess. Truncated output achievement unlocked.
Comment #10
dawehnerComment #11
alexpottHere is an alternate fix. Basically we have a problem with config's database storage being constructed by booting the kernel. Then Postgres's installer tasks come along and use
Database::closeConnection()which completely messes up the connection in config's database storage (and the container). There are other methods on theDatabaseclass that don't play nice with the container either.Comment #12
alexpottTalked to @dawehner on IRC we both agreed that the scope of #11 seems quite big and whilst it might be desirable long term it's not necessary to fix this critical. Uploading #2 with improved docs.
Comment #13
alexpottRemoved unnecessary change.
Comment #14
plachI manually tested this (updated the STR) and the patch fixes the issue. Given how tests are run in our infrastructure, it's not possible to provide a reliably failing test for this, so manual testing should be enough.
Comment #15
dawehnerIt still IMHO doesn't explain exactly why we need a new database connection (because the tasks potentially close them?)
Comment #16
alexpottBetter comment.
Comment #17
plachPrevious patch is green, this is just a doc change, so no need to wait for the bot :)
Comment #18
mradcliffeUpdated issue summary with beta evaluation template.
Comment #19
catchCommitted/pushed to 8.0.x, thanks!
Comment #21
bzrudi71 commentedSad to report that this seems not completely fixed. Over in #2426579: Change method name for pgsql driver's ensureIdentifiersLength() to accurately describe what the method is doing the first test was failing during one of the PG bot runs :(
Please see: https://www.drupal.org/pift-ci-job/31911
Comment #22
alexpott@bzrudi71 we at least it is a different type of failure. Either @catch or @Mixologic told me there might be a DtupalCI timing issue with postgres db not being quite ready by the time the job starts. Maybe that caused that.
Comment #23
MixologicWe had hacked in a 62 second wait (used to be 5) hoping that would be enough. Will add this to our 'to look at list'
Comment #24
bzrudi71 commentedAh yes, thanks! And I just discovered #2564659: pgsql does not always turn on where @isntall already committed a first patch, let's see :)