kgyrtkirk commented on code in PR #15465:
URL: https://github.com/apache/druid/pull/15465#discussion_r1455534365
##########
sql/src/test/java/org/apache/druid/sql/calcite/util/SqlTestFramework.java:
##########
@@ -170,6 +174,8 @@ default CatalogResolver createCatalogResolver()
JoinableFactoryWrapper
createJoinableFactoryWrapper(LookupExtractorFactoryContainerProvider
lookupProvider);
void finalizeTestFramework(SqlTestFramework sqlTestFramework);
+
+ void beforeNewFrameworkCreateHook() throws Exception;
Review Comment:
all the `Calcite*Test` classes implement this interface; wanted to name the
method such a way that it stands out ...
main reason behind this is:
* `temporaryFoler` is provided by a junit rule
* the rule provides a temp folder for every `testMethod` (and removes
after)
* the field `baseComponentSupplier` depends on the `temporaryFolder` rule to
be initialized
* `SqlTestFrameworkConfig` also implemented as a junit rule
* `SqlTestFrameworkConfig` needs to initialize the framework; however the
`baseComponentSupplier` is not yet filled in for the class as only the *rules*
are being inited...
one way around could be to somehow stuff in the `baseComponentSupplier` into
the new junit rule stuff; but that would mean I'll have to also move the
tempfolder inside...so I've opted for a badly named interface method instead -
I'll give it a try and see how complicated this would be
--
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]