Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-10622

TestHttpFlowFileServerProtocol.testTransferTwoFiles is a Flaky Test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.20.0
    • NiFi Registry
    • None
    • Apache Maven 3.6.0;
      openjdk version "1.8.0_342";
      OpenJDK Runtime Environment (build 1.8.0_342-8u342-b07-0ubuntu1~20.04-b07);
      OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode);

    Description

      org.apache.nifi.remote.protocol.http.TestHttpFlowFileServerProtocol.testTransferTwoFiles 
      org.apache.nifi.remote.protocol.http.TestHttpFlowFileServerProtocol.testTransferOneFile 

      These tests can pass the maven-test. However, they show non-deterministic behavior under [NonDex|https://github.com/TestingResearchIllinois/NonDex]'s test and thus failed. 

      The test result is below:

      [ERROR] Errors:  [ERROR]   TestHttpFlowFileServerProtocol.testTransferTwoFiles:411 » IO StandardHttpFlowFileServerProtocol[CommsID=testTransferTwoFiles] Sent data to peer Peer[url=http://peer-host:8080/] but calculated CRC32 Checksum as 2668300945 while peer calculated CRC32 Checksum as 3058746557; canceling transaction and rolling back session 

      It seems like two peers calculate a different checksum, therefore the transaction was rolled back, and thus the test failed.

      Steps to reproduce the failure:

      1. install [NonDex|https://github.com/TestingResearchIllinois/NonDex]
      2. run the following command in nifi
        MODULE=nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site
        
        TEST=org.apache.nifi.remote.protocol.http.TestHttpFlowFileServerProtocol#testTransferTwoFiles
        
        mvn install -pl $MODULE -am -DskipTests
        
        mvn -pl $MODULE edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=$TEST

            3. the result will be saved under the package folder in .nondex

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              _Yiteng_ Yiteng Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m