kgyrtkirk commented on code in PR #17578:
URL: https://github.com/apache/druid/pull/17578#discussion_r1888170789


##########
sql/src/test/java/org/apache/druid/sql/calcite/util/SqlTestFramework.java:
##########
@@ -905,10 +904,17 @@ private SqlTestFramework(Builder builder)
     overrideModules.add(testSetupModule());
     builder.componentSupplier.configureGuice(injectorBuilder, overrideModules);
 
-    ServiceInjectorBuilder serviceInjector = new 
ServiceInjectorBuilder(injectorBuilder);
-    serviceInjector.addAll(overrideModules);
+    // First override with the testSetupModule.  It would be better if the 
existing tests were updated to not require
+    // this step of override as this is actually an indication that the 
objects aren't managing their bindings
+    // properly.  This can cause obfuscation when trying to figure out where a 
binding/object is coming from, slowing
+    // developer productivity.  For expediency, we add this extra layer of 
overrides just to make things work while
+    // work can then be done to fix the problematic configurations.  It would 
be awesome if this override was no
+    // longer neede some day.
+    injectorBuilder.overrideCurrentGuiceModules(List.of(testSetupModule()));

Review Comment:
   I don't think this is needed



-- 
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]

Reply via email to