Martijn Visser created FLINK-40887:
--------------------------------------
Summary: TaskFailureITCase.testJobWithoutObjectReuse fails with
"Expecting Optional to contain a value but it was empty"
Key: FLINK-40887
URL: https://issues.apache.org/jira/browse/FLINK-40887
Project: Flink
Issue Type: Bug
Components: Runtime / Coordination
Affects Versions: 2.2.2, 2.4.0
Reporter: Martijn Visser
https://github.com/apache/flink/actions/runs/36954250535/job/110677877340
(master nightly 2026-10-02, AdaptiveScheduler profile)
{code}
[ERROR]
org.apache.flink.test.example.failing.TaskFailureITCase.testJobWithoutObjectReuse
-- Time elapsed: 1.338 s <<< FAILURE!
java.lang.AssertionError:
Expecting Optional to contain a value but it was empty.
at
org.apache.flink.test.example.failing.TaskFailureITCase.testProgram(TaskFailureITCase.java:57)
at
org.apache.flink.test.util.JavaProgramTestBase.executeProgramMultipleTimes(JavaProgramTestBase.java:108)
at
org.apache.flink.test.util.JavaProgramTestBase.testJobWithoutObjectReuse(JavaProgramTestBase.java:136)
{code}
The job itself failed as expected with "This is an expected Test Exception:1"
after one restart, but the exception the client caught does not contain it. In
the test log the collect client reached the sink of both attempts:
{code}
02:31:35,262 [Thread-8] INFO
org.apache.flink.streaming.api.operators.collect.CollectSinkFunction [] -
Invalid request. Received version = , offset = 0, while expected version =
0cbf0890-bb27-4181-a956-cb28a988886f, offset = 0
02:31:35,392 [Thread-10] INFO
org.apache.flink.streaming.api.operators.collect.CollectSinkFunction [] -
Invalid request. Received version = 0cbf0890-bb27-4181-a956-cb28a988886f,
offset = 0, while expected version = 672ae5ae-b048-4a8a-a231-979d262d8eb1,
offset = 0
{code}
In the passing testJobWithObjectReuse run right after it, it reached neither.
The release-2.2 failure on 2026-09-11 has the same two lines.
It failed before in the AdaptiveScheduler tests leg of these nightlies, never
in the other profiles:
https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=71463&view=logs&j=8fd9202e-fd17-5b26-353c-ac1ff76c8f28
(master, 2025-12-31)
https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=76172&view=logs&j=8fd9202e-fd17-5b26-353c-ac1ff76c8f28
(release-2.2, 2026-06-19)
https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=77101&view=logs&j=8fd9202e-fd17-5b26-353c-ac1ff76c8f28
(master, 2026-07-15)
https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=78966&view=logs&j=8fd9202e-fd17-5b26-353c-ac1ff76c8f28
(release-2.2, 2026-09-11)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)