Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
https://www.drupal.org/pift-ci-job/432739 - we still have some fails, resolve them!
Comment | File | Size | Author |
---|---|---|---|
#10 | fix_tests_with_the-2790133-10.patch | 2.87 KB | borisson_ |
Comments
Comment #2
borisson_I figured out which search api commit introduced our failures.
it's http://cgit.drupalcode.org/search_api/commit/?h=8.x-1.x&id=921b616ff2a7c...
I added a test that did:
$this->drupalGet('admin/config/search/search-api/index/database_search_index/fields');
When I do
git checkout 921b616
this is the result of the page:The same thing with the previous commit gives a better result:
git checkout 2c41808
Most of the failures we currently have are related to the "keywords" field not being indexed, and so we can't select it and create a facet out of it. This perpetuates troughout the entire tests and gives us all the fails we currently have.
Now figuring out what actually in that commit caused the keywords field to no longer be indexed.
Comment #3
borisson_So, I tested this by doing
git revert 921b616ff2a7ce1322dc86047619901b848ba7a4 -X theirs
from the search api repo and running al the tests.These are the results:
Commit reverted: https://gist.github.com/borisson/57e2f459cc0f0066518e80e47012fac2
With a fresh checkout: https://gist.github.com/borisson/09c296d707b76cb69f52f47b4056e3d0
So there are still other failures, but there's a lot less of 'm. So now we should figure out what exactly in the commit caused the keywords field to not be index anymore.
Comment #4
marthinal CreditAttribution: marthinal commentedI think I found where is the problem:
http://cgit.drupalcode.org/search_api/commit/?h=8.x-1.x&id=921b616ff2a7c...
Here the fields we're removing:
And here the fields we're indexing:
So yep, makes sense:
IMHO we need to change the way we're adding the fields to the index and we need to understand the correct way. Probably we can reuse code from search API tests to verify the correct way and how to fix our problem.
IMHO this is critical because tests are broken.
Comment #5
drunken monkeyThe problem seems to be one we also had to solve in the Search API: namely that it now suddenly matters, that the bundles we're using in the tests aren't properly defined at the point when the index is created.
The attached patch should solve this, with it only fails in
\Drupal\facets\Tests\IntegrationTest::testBlockView()
remain.Comment #7
borisson_Like @drunken monkey said, this helped for almost all tests, we still need to resolve the
\Drupal\facets\Tests\IntegrationTest::testBlockView()
test, it also looks like we have a bunch of fails on php5.x that don't happen on php7, so we need to figure those out as well.https://www.drupal.org/pift-ci-job/437913
https://www.drupal.org/pift-ci-job/437917
Comment #8
borisson_The fail in the javascript test was quite easy to resolve. The fail in the block test is still a mystery.
Comment #9
borisson_I think the search api query is not executed for blocks. Or at least it looks like that, I have no idea how to resolve that. I also don't see any tests in Search API that use a block display either to confirm or deny that suspicion.
Comment #10
borisson_Looks like that also still fails in search api: #2792569: Views with a block display do not display results, so I guess we can comment the test for now?
Comment #12
borisson_Pushed #10, this should lead to green tests, at least for php7.
Comment #16
borisson_Closing this issue, as php7-tests are now green.
Comment #21
borisson_Was already committed, bad testbot.