lirui-apache commented on a change in pull request #9039:
[FLINK-13170][table-planner] Planner should get table factory from ca…
URL: https://github.com/apache/flink/pull/9039#discussion_r302964845
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/batch/sql/SinkTest.scala
##########
@@ -60,4 +67,25 @@ class SinkTest extends TableTestBase {
util.verifyPlan()
}
+ @Test
+ def testCatalogTableSink(): Unit = {
Review comment:
I did a little bit test and seems `Mockito.when(...)` doesn't count as an
invocation. The `getTableFactory` is called twice because we have
`catalog.get().getTableFactory.isPresent` in `PlannerBase.getTableSink` and
`catalog.getTableFactory().orElse(null)` in
`TableFactoryUtil.createTableSinkForCatalogTable`. From a UT's perspective,
these are implementation details. So I prefer not to verify "atLeast(2)". Does
that make sense to you?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services