Skip to content

Fix flaky#6340

Closed
Xinyihe123 wants to merge 2 commits intoapache:mainfrom
Xinyihe123:fix-flaky
Closed

Fix flaky#6340
Xinyihe123 wants to merge 2 commits intoapache:mainfrom
Xinyihe123:fix-flaky

Conversation

@Xinyihe123
Copy link

Summary

Fixed flaky tests in nifi-commons/nifi-site-to-site-client.

These tests may fail due to the random iteration order of Hashmap.

The flaky tests are:

  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTP
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTPS
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTPWithProxy
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTPSWithProxyAuth
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTPSWithProxy
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendLargeFileHTTPWithProxyAuth
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSlowClientSuccess
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccess
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccessCompressed
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccessHTTPS
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccessMultipleUrls
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccessWithProxy
  • org.apache.nifi.remote.client.http.TestHttpClient#testSendSuccessWithProxyAuth

Changes:
Use LinkedHashMap instead of HashMap in the test.

Tracking

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • [ X] Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

One can manifest this problem using [NonDex]

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 8
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@Xinyihe123 Xinyihe123 closed this Aug 28, 2022
@Xinyihe123 Xinyihe123 deleted the fix-flaky branch August 28, 2022 22:12
@Xinyihe123 Xinyihe123 restored the fix-flaky branch August 28, 2022 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant