Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-30852

TaskTest.testCleanupWhenSwitchToInitializationFails reports AssertionError but doesn't fail

Details

    Description

      While investigating FLINK-30844, I noticed that TaskTest.testCleanup reports an AssertionError in the logs but doesn't fail:

      00:59:01,886 [                main] ERROR org.apache.flink.runtime.taskmanager.Task                    [] - Error while canceling task Test Task (1/1)#0.
      java.lang.AssertionError: This should not be called
              at org.junit.Assert.fail(Assert.java:89) ~[junit-4.13.2.jar:4.13.2]
              at org.apache.flink.runtime.taskmanager.TaskTest$TestInvokableCorrect.cancel(TaskTest.java:1304) ~[test-classes/:?]
              at org.apache.flink.runtime.taskmanager.Task.cancelInvokable(Task.java:1529) ~[classes/:?]
              at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:796) ~[classes/:?]
              at org.apache.flink.runtime.taskmanager.Task.run(Task.java:562) ~[classes/:?]
              at org.apache.flink.runtime.taskmanager.TaskTest.testCleanupWhenSwitchToInitializationFails(TaskTest.java:184) ~[test-classes/:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292]
      [...]
      

      akalashnikov is this expected?

      The affected build is https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=45440&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=24c3384f-1bcb-57b3-224f-51bf973bbee8

      Attachments

        Issue Links

          Activity

            Oh, It is not the correct test. It actually expects that this method would be called. I will change that.

            Thanks for the report.

            akalashnikov Anton Kalashnikov added a comment - Oh, It is not the correct test. It actually expects that this method would be called. I will change that. Thanks for the report.

            merged to master: a6f0165c

            akalash Anton Kalashnikov added a comment - merged to master: a6f0165c
            mapohl Matthias Pohl added a comment -

            The issue's version is misleading. It appears that you've merged the change into master (which means that it was fixed in 1.18.0). I'm gonna update the fixVersion accordingly. May you also provide a 1.17 backport?

            mapohl Matthias Pohl added a comment - The issue's version is misleading. It appears that you've merged the change into master (which means that it was fixed in 1.18.0). I'm gonna update the fixVersion accordingly. May you also provide a 1.17 backport?

            Yeh, sorry, I missed up with versions. I will backport it to 1.17 shortly.

            akalash Anton Kalashnikov added a comment - Yeh, sorry, I missed up with versions. I will backport it to 1.17 shortly.

            merged to release-1.17: aa47c3f862414511e92637d9816f6908c86b4cf6

            akalash Anton Kalashnikov added a comment - merged to release-1.17: aa47c3f862414511e92637d9816f6908c86b4cf6

            People

              akalash Anton Kalashnikov
              mapohl Matthias Pohl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: