dweiss commented on a change in pull request #470:
URL: https://github.com/apache/lucene/pull/470#discussion_r761835484
##########
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());
+
+ // We're sure the services correspond to each other. Now, for each
service, compare the
+ // providers.
+ for (var service : modularProviders.keySet()) {
+ Assertions.assertThat(modularProviders.get(service))
+ .as(
+ "Modular providers of service "
+ + service
+ + " in module: "
+ + module.descriptor().name())
+ .containsAll(classpathProviders.get(service));
Review comment:
Corrected in both.
--
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]