sashapolo commented on code in PR #7727:
URL: https://github.com/apache/ignite-3/pull/7727#discussion_r2903559145
##########
modules/configuration/src/testFixtures/java/org/apache/ignite/internal/configuration/testframework/ConfigurationExtension.java:
##########
@@ -86,35 +99,28 @@ public class ConfigurationExtension implements
BeforeEachCallback, AfterEachCall
/** Key to store {@link ExecutorService} in {@link
ExtensionContext.Store}. */
private static final Object POOL_KEY = new Object();
- private static final List<ConfigurationModule> LOCAL_MODULES = new
ArrayList<>();
- private static final List<ConfigurationModule> DISTRIBUTED_MODULES = new
ArrayList<>();
+ private static final ConfigurationModule LOCAL_MODULE;
- /** All {@link ConfigurationExtension} classes in classpath. */
- private static final List<Class<?>> EXTENSIONS;
-
- /** All {@link PolymorphicConfigInstance} classes in classpath. */
- private static final List<Class<?>> POLYMORPHIC_EXTENSIONS;
+ private static final ConfigurationModule DISTRIBUTED_MODULE;
static {
// Automatically find all @InternalConfiguration and
@PolymorphicConfigInstance classes
// to avoid configuring extensions manually in every test.
ServiceLoader<ConfigurationModule> modules =
ServiceLoader.load(ConfigurationModule.class);
- List<Class<?>> extensions = new ArrayList<>();
- List<Class<?>> polymorphicExtensions = new ArrayList<>();
+ List<ConfigurationModule> localModules = new ArrayList<>();
+ List<ConfigurationModule> distributedModules = new ArrayList<>();
modules.forEach(configurationModule -> {
- extensions.addAll(configurationModule.schemaExtensions());
-
polymorphicExtensions.addAll(configurationModule.polymorphicSchemaExtensions());
if (configurationModule.type() == LOCAL) {
- LOCAL_MODULES.add(configurationModule);
+ localModules.add(configurationModule);
} else {
- DISTRIBUTED_MODULES.add(configurationModule);
+ distributedModules.add(configurationModule);
}
});
- EXTENSIONS = List.copyOf(extensions);
- POLYMORPHIC_EXTENSIONS = List.copyOf(polymorphicExtensions);
+ LOCAL_MODULE = new CompoundModule(LOCAL, localModules);
Review Comment:
Could you please elaborate what parts are you talking about? They are
similar, yes, but we are using some fake stuff, like fake super roots.
--
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]