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

DataStreamUserDefinedFunctionITCase occasionally fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: Tests
    • Labels:

      Description

      Three test cases in DataStreamUserDefinedFunctionITCase forgot to call the StreamITCase.clear method. This will cause it occasionally fails. Because the result of one case may affect another sometimes.

      java.lang.AssertionError: 
      Expected :MutableList(Anna#44,1, Anna#44,2, Anna#44,Anna#44, Jack#22,1, Jack#22,2, Jack#22,Jack#22, John#19,1, John#19,2, John#19,John#19, nosharp,1, nosharp,2, nosharp,nosharp)
      Actual   :MutableList(Anna#44,1, Anna#44,2, Anna#44,Anna#44, Jack#22,1, Jack#22,2, Jack#22,Jack#22, John#19,1, John#19,2, John#19,John#19, Miller,13.56, Smith,180.2, Williams,4.68, Williams,69.0, nosharp,1, nosharp,2, nosharp,nosharp)
      
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:834)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at org.apache.flink.table.runtime.datastream.DataStreamUserDefinedFunctionITCase.testTableFunctionWithVariableArguments(DataStreamUserDefinedFunctionITCase.scala:226)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
      

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user clarkyzl opened a pull request:

          https://github.com/apache/flink/pull/3530

          FLINK-6040 [table] DataStreamUserDefinedFunctionITCase occasionally fails

          Type: Bug
          Priority: Major
          Components: table, test
          Problem Definition: DataStreamUserDefinedFunctionITCase occasionally fails
          Design:
          Three test cases in `DataStreamUserDefinedFunctionITCase` forgot to call the method `StreamITCase.clear method`. This will cause the case occasionally fails. Because the result of one case may affect another sometimes. The patch the is simply adding the missing methods.
          Impact Analysis:
          Only the tests. No impacts on the core code.
          Test:
          Tested `DataStreamUserDefinedFunctionITCase` locally.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/clarkyzl/flink flink-6040

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3530.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3530



          Show
          githubbot ASF GitHub Bot added a comment - GitHub user clarkyzl opened a pull request: https://github.com/apache/flink/pull/3530 FLINK-6040 [table] DataStreamUserDefinedFunctionITCase occasionally fails Type: Bug Priority: Major Components: table, test Problem Definition: DataStreamUserDefinedFunctionITCase occasionally fails Design: Three test cases in `DataStreamUserDefinedFunctionITCase` forgot to call the method `StreamITCase.clear method`. This will cause the case occasionally fails. Because the result of one case may affect another sometimes. The patch the is simply adding the missing methods. Impact Analysis: Only the tests. No impacts on the core code. Test: Tested `DataStreamUserDefinedFunctionITCase` locally. You can merge this pull request into a Git repository by running: $ git pull https://github.com/clarkyzl/flink flink-6040 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3530.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3530
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user KurtYoung commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3530#discussion_r105869656

          — Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/datastream/DataStreamUserDefinedFunctionITCase.scala —
          @@ -85,6 +85,8 @@ class DataStreamUserDefinedFunctionITCase extends StreamingMultipleProgramsTestB
          def testUserDefinedTableFunctionWithParameter(): Unit = {
          val env = StreamExecutionEnvironment.getExecutionEnvironment
          val tEnv = TableEnvironment.getTableEnvironment(env)
          + StreamITCase.clear
          — End diff –

          move these to case set up?

          Show
          githubbot ASF GitHub Bot added a comment - Github user KurtYoung commented on a diff in the pull request: https://github.com/apache/flink/pull/3530#discussion_r105869656 — Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/datastream/DataStreamUserDefinedFunctionITCase.scala — @@ -85,6 +85,8 @@ class DataStreamUserDefinedFunctionITCase extends StreamingMultipleProgramsTestB def testUserDefinedTableFunctionWithParameter(): Unit = { val env = StreamExecutionEnvironment.getExecutionEnvironment val tEnv = TableEnvironment.getTableEnvironment(env) + StreamITCase.clear — End diff – move these to case set up?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user KurtYoung commented on the issue:

          https://github.com/apache/flink/pull/3530

          looks good, merging

          Show
          githubbot ASF GitHub Bot added a comment - Github user KurtYoung commented on the issue: https://github.com/apache/flink/pull/3530 looks good, merging
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3530

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3530

            People

            • Assignee:
              clarkyzl Zhuoluo Yang
              Reporter:
              clarkyzl Zhuoluo Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development