[
https://issues.apache.org/jira/browse/FLINK-31014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias Pohl updated FLINK-31014:
----------------------------------
Description:
I noticed for a few interfaces that we don't expose checked exceptions where
it's actually useful. {{DataStreamSinkV2ExternalContext.createSink}} or
{{ExternalSystemSplitDataWriter.writeRecords}}, for instance, is not exposing
any Throwable except for {{UnsupportedOperationException}}. This implies that
internal caught exception need to be either caught and transformed into a
{{RuntimeException}} or handled internally. AFAIU, that's not what we want. The
connector testing framework wants exceptions to be exposed. Therefore, we
should improve the interfaces of the framework to allow exceptions to happen
(probably depending on the usecase).
This makes it easier for contributors implementing test cases for their
connector giving them the freedom to just expose undesired exceptions instead
of handling them internally. JUnit should be the actor dealing with these
exceptions.
was:
I noticed for a few interfaces that we don't expose checked exceptions where
it's actually useful. {{DataStreamSinkV2ExternalContext.createSink}}, for
instance, is not exposing any Throwable except for
{{UnsupportedOperationException}}. This implies that internal caught exception
need to be either caught and transformed into a {{RuntimeException}} or handled
internally. AFAIU, that's not what we want. The connector testing framework
wants exceptions to be exposed. Therefore, we should improve the interfaces of
the framework to allow exceptions to happen (probably depending on the usecase).
This makes it easier for contributors implementing test cases for their
connector giving them the freedom to just expose undesired exceptions instead
of handling them internally. JUnit should be the actor dealing with these
exceptions.
> Expose exceptions in connector testing framework
> ------------------------------------------------
>
> Key: FLINK-31014
> URL: https://issues.apache.org/jira/browse/FLINK-31014
> Project: Flink
> Issue Type: Improvement
> Components: API / DataStream, Test Infrastructure
> Affects Versions: 1.17.0, 1.16.1, 1.18.0
> Reporter: Matthias Pohl
> Priority: Major
>
> I noticed for a few interfaces that we don't expose checked exceptions where
> it's actually useful. {{DataStreamSinkV2ExternalContext.createSink}} or
> {{ExternalSystemSplitDataWriter.writeRecords}}, for instance, is not exposing
> any Throwable except for {{UnsupportedOperationException}}. This implies that
> internal caught exception need to be either caught and transformed into a
> {{RuntimeException}} or handled internally. AFAIU, that's not what we want.
> The connector testing framework wants exceptions to be exposed. Therefore, we
> should improve the interfaces of the framework to allow exceptions to happen
> (probably depending on the usecase).
> This makes it easier for contributors implementing test cases for their
> connector giving them the freedom to just expose undesired exceptions instead
> of handling them internally. JUnit should be the actor dealing with these
> exceptions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)