We currently have a few tests commented out in the database backend since they weren't working (if I recall correctly). We should look into that and correct it – especially now that Facet API is under active development.
(Just uncommenting the tests to see what goes wrong would be a good start, I guess.)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2482693-5--facets_tests--interdiff.txt | 531 bytes | drunken monkey |
| #5 | 2482693-5--facets_tests.patch | 12.82 KB | drunken monkey |
| #4 | database_backend_facets_tests-2482693-4.patch | 12.82 KB | rosinegrean |
| #2 | database_backend_facets_tests-2482693-2.patch | 6.7 KB | rosinegrean |
| #1 | search_api_facet_tests.png | 89.95 KB | rosinegrean |
Comments
Comment #1
rosinegrean commentedHello,
First part is done: I've uncommented the code in the facet test and there are 2 failed tests.
Comment #2
rosinegrean commentedActually, there were another 2 tests failing in regressionTests().
I'm not sure what i did is ok, but the tests pass now.
Comment #3
drunken monkeyThanks a lot for your work on this!
Looking over this now, I see there are two separate issues that made the tests fail:
createFilter()method (in class and interface). That means, while everything else would (probably) be working fine, creating a filter with tags just fails silently, resulting in wrong OR facets (first batch of commented-out tests).entity_testentity type hastypenow defined as a real bundle, not just any property. This, however, means that it can never beNULL– however, that's exactly what we need for the regression tests (second commented-out batch). It also influences the facets in the first batch, and would also be needed for a third commented-out batch (unrelated to facets) further down the page (around line 652).So, the correct way to deal with this would be to fix the
createFilter()oversight, add an additional property/field that can beNULLand then change the tests as little as possible.Comment #4
rosinegrean commentedThanks for your feedback.
I think i managed to fix it, no more errors for this tests.
Comment #5
drunken monkeyGreat job, thanks a lot! Looks very good and also passes both locally and here with the test bot.
Just one detail:
I'd say cardinality -1 would make more sense here, also to stay in line with the original.
For multi-valued fields, we already have
keywords, after all.The attached patch should fix this, just waiting for test bot confirmation.
Comment #7
drunken monkeyOK, great.
Committed.
Thanks a lot again, really nice work!
Comment #9
BRB000 commentedI am new to FACETS application. Can someone explain what is the FACETS Backend table? I tried to find answers, but couldn't get useful information that would satisfy my need.
Any explanations highly appreciated.
Thanks.