Tzu-Li (Gordon) Tai created FLINK-23762:
-------------------------------------------
Summary: Revisit RequestReplyFunctionTest unit tests
Key: FLINK-23762
URL: https://issues.apache.org/jira/browse/FLINK-23762
Project: Flink
Issue Type: Technical Debt
Components: Stateful Functions
Reporter: Tzu-Li (Gordon) Tai
Assignee: Tzu-Li (Gordon) Tai
There's some tech debt piling up in the {{RequestReplyFunctionTest}}. We need
to revisit how we're unit testing the {{RequestReplyFunction}}.
Some outstanding issues:
* We're explicitly calling `invoke` with async results to simulate function
responses. With changes in FLINK-20574, that's no longer always the case (the
first request is a blocking call). This hints the fact that those unit tests
are leaking implementation detail and thus making them hard to extend.
* State restore is not properly mocked, which becomes apparent in
{{retryBatchOnUnkownAsyncResponseAfterRestore}}. The states "batch" and
"requestState" starts again from fresh in that test. To properly simulate a
snapshot and restore, we probably want to move all persisted state of
{{RequestReplyFunction}}, including "batch", "requestState", and the remote
function values, all into a separate wrapper class.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)