uschindler commented on a change in pull request #470:
URL: https://github.com/apache/lucene/pull/470#discussion_r761473889



##########
File path: 
lucene/distribution-tests/src/test/org/apache/lucene/distribution/TestModularLayer.java
##########
@@ -108,4 +140,76 @@ public void testAllModulesHaveExpectedVersion() {
           .isEqualTo(luceneBuildVersion);
     }
   }
+
+  /** Ensure SPIs are equal for the module and classpath layer. */
+  @Test
+  public void testModularAndClasspathProvidersAreConsistent() throws 
IOException {
+    for (var module : allModules) {
+      TreeMap<String, TreeSet<String>> modularProviders = 
getModularServiceProviders(module);
+      TreeMap<String, TreeSet<String>> classpathProviders = 
getClasspathServiceProviders(module);
+
+      // Compare services first so that the exception is shorter.
+      Assertions.assertThat(modularProviders.keySet())
+          .as("Modular services in module: " + module.descriptor().name())
+          .containsAll(classpathProviders.keySet());

Review comment:
       IMHO it should be enough to just compare modularProviders and 
classpathProviders for equality in total.




-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to