fapaul commented on a change in pull request #18033:
URL: https://github.com/apache/flink/pull/18033#discussion_r780179560
##########
File path:
flink-connectors/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/table/ElasticsearchDynamicSinkFactoryBaseTest.java
##########
@@ -227,4 +232,19 @@ public void validateWrongCredential() {
"")
.build()));
}
+
+ @Test
+ public void testSinkParallelism() {
+ ElasticsearchDynamicSinkFactoryBase sinkFactory = createSinkFactory();
+ DynamicTableSink sink =
+ sinkFactory.createDynamicTableSink(
+ createPrefilledTestContext()
+ .withOption(SINK_PARALLELISM.key(), "2")
+ .build());
+ Assertions.assertTrue(sink instanceof ElasticsearchDynamicSink);
+ ElasticsearchDynamicSink esSink = (ElasticsearchDynamicSink) sink;
+ SinkProvider provider =
+ (SinkProvider) esSink.getSinkRuntimeProvider(new
ElasticsearchUtil.MockContext());
+ Assertions.assertEquals(2, (long) provider.getParallelism().get());
Review comment:
Can you please use assertJ for the assertions?
--
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]