[
https://issues.apache.org/jira/browse/FLINK-18052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123396#comment-17123396
]
Dawid Wysakowicz commented on FLINK-18052:
------------------------------------------
I think that's the only improvement I can think of. Just as an explanation for
the future. One can query the Elastichsearch with Search API only for the
results that were indexed internally. That's why we need to poll the ES
cluster. It's different in the GET API as it returns also documents that were
not yet indexed. However for the GET API we need to know the id of the
document. This failling test checks the case when there is no id and thus it
does not use the GET API.
I will open a PR to increase the timeout. If the test keep failling I'd suggest
dropping it and depending only on the unit tests.
> Elasticsearch7DynamicSinkITCase.testWritingDocumentsNoPrimaryKey fails with
> NPE
> -------------------------------------------------------------------------------
>
> Key: FLINK-18052
> URL: https://issues.apache.org/jira/browse/FLINK-18052
> Project: Flink
> Issue Type: Bug
> Components: Connectors / ElasticSearch
> Affects Versions: 1.11.0
> Reporter: Robert Metzger
> Priority: Major
> Labels: test-stability
> Fix For: 1.11.0
>
>
> CI:
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=2481&view=logs&j=d44f43ce-542c-597d-bf94-b0718c71e5e8&t=34f486e1-e1e4-5dd2-9c06-bfdd9b9c74a8
> {code}
> 2020-05-30T22:32:52.3703325Z [INFO] Running
> org.apache.flink.streaming.connectors.elasticsearch.table.Elasticsearch7DynamicSinkITCase
> 2020-05-30T22:33:08.3791670Z [ERROR] Tests run: 3, Failures: 0, Errors: 1,
> Skipped: 0, Time elapsed: 16.006 s <<< FAILURE! - in
> org.apache.flink.streaming.connectors.elasticsearch.table.Elasticsearch7DynamicSinkITCase
> 2020-05-30T22:33:08.3793500Z [ERROR]
> testWritingDocumentsNoPrimaryKey(org.apache.flink.streaming.connectors.elasticsearch.table.Elasticsearch7DynamicSinkITCase)
> Time elapsed: 7.671 s <<< ERROR!
> 2020-05-30T22:33:08.3794313Z java.lang.ArrayIndexOutOfBoundsException: 0
> 2020-05-30T22:33:08.3794992Z at
> org.elasticsearch.search.SearchHits.getAt(SearchHits.java:157)
> 2020-05-30T22:33:08.3795921Z at
> org.apache.flink.streaming.connectors.elasticsearch.table.Elasticsearch7DynamicSinkITCase.testWritingDocumentsNoPrimaryKey(Elasticsearch7DynamicSinkITCase.java:226)
> 2020-05-30T22:33:08.3796778Z at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 2020-05-30T22:33:08.3797675Z at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 2020-05-30T22:33:08.3798442Z at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 2020-05-30T22:33:08.3799083Z at
> java.lang.reflect.Method.invoke(Method.java:498)
> 2020-05-30T22:33:08.3799740Z at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 2020-05-30T22:33:08.3800506Z at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 2020-05-30T22:33:08.3801236Z at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 2020-05-30T22:33:08.3801938Z at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 2020-05-30T22:33:08.3802620Z at
> org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)