tflobbe commented on code in PR #15294:
URL: https://github.com/apache/lucene/pull/15294#discussion_r2445624236
##########
lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorizationProvider.java:
##########
@@ -24,6 +24,10 @@ public void testCallerOfGetter() {
expectThrows(UnsupportedOperationException.class,
TestVectorizationProvider::illegalCaller);
}
+ public void testGetProviderName() {
+ assertEquals("DefaultVectorizationProvider",
VectorizationProvider.getImplementationName());
Review Comment:
You mean, under what circumstances we could get
`VectorizationProvider.getImplementationName()` return something other than
`DefaultVectorizationProvider` (and thus, make the test fail?). If so, I was
thinking something along those lines too, like, if someone runs the tests with
the right conditions, this could return the Panama implementation and make the
test fail.
I guess an option to handle this case is to relax the test and make the
return name be any of the existing implementations. Still, not ideal because it
would break in the future if a new implementation is added but not included in
this list. We could make the test more complex by looking for all
implementations dynamically, but at that point we aren't testing anything that
valuable and the test becomes way more complex than the code itself.
Is that what you were thinking? or did I misunderstood your comment?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]