You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/10/13 23:42:07 UTC

[GitHub] [nifi] ZhewenFu opened a new pull request, #6525: NIFI-10639 Fix testAddedRowsTwoTables

ZhewenFu opened a new pull request, #6525:
URL: https://github.com/apache/nifi/pull/6525

   <!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
   <!-- contributor license agreements.  See the NOTICE file distributed with -->
   <!-- this work for additional information regarding copyright ownership. -->
   <!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
   <!-- (the "License"); you may not use this file except in compliance with -->
   <!-- the License.  You may obtain a copy of the License at -->
   <!--     http://www.apache.org/licenses/LICENSE-2.0 -->
   <!-- Unless required by applicable law or agreed to in writing, software -->
   <!-- distributed under the License is distributed on an "AS IS" BASIS, -->
   <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
   <!-- See the License for the specific language governing permissions and -->
   <!-- limitations under the License. -->
   
   # Summary
   
   [NIFI-00000](https://issues.apache.org/jira/browse/NIFI-00000)
   Fix test `org.apache.nifi.processors.standard.QueryDatabaseTableRecordTest.testAddedRowsTwoTables` and `org.apache.nifi.processors.standard.QueryDatabaseTableTest.testAddedRowsTwoTables`. Those two tests are flaky since they didn't do the sanity check where no flowfiles/rows should be transferred and would occasionally fail. To fix the test, I added the sanity check before asserting the `maxvalue.id`. I also changed the parameter `QueryDatabaseTable.MAX_ROWS_PER_FLOW_FILE` to 3 to make the tests clearer and more consistent.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [x] 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
   - [x] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [x] Build completed using `mvn clean install -P contrib-check`
     - [x] JDK 8
     - [ ] JDK 11
     - [ ] JDK 17
   
   ### Licensing
   
   - [x] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [x] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory closed pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables
URL: https://github.com/apache/nifi/pull/6525


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6525:
URL: https://github.com/apache/nifi/pull/6525#issuecomment-1290756500

   I'm not sure how this addresses the flakiness of the test. Is this test failing frequently in Github Actions? I don't quite understand how running the runner a second time and verifying no FlowFiles were transferred fixes the test.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #6525:
URL: https://github.com/apache/nifi/pull/6525#issuecomment-1419562041

   Thanks for the contribution @ZhewenFu. Based on the latest comments, it sounds like further work is necessary to understanding the underlying cause of non-deterministic behavior. With that background, I am closing the current pull request, but feel free to follow up with a new pull request when you have narrowed down the source of the behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] ZhewenFu commented on pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables

Posted by GitBox <gi...@apache.org>.
ZhewenFu commented on PR #6525:
URL: https://github.com/apache/nifi/pull/6525#issuecomment-1317673439

   > I'm not sure how this addresses the flakiness of the test. Is this test failing frequently in Github Actions? I don't quite understand how running the runner a second time and verifying no FlowFiles were transferred fixes the test.
   
   * Sorry for the late response. I detected that the test results are flaky using the NonDex tool for catching non-deterministic/flaky tests (https://github.com/TestingResearchIllinois/NonDex).
   
     You may reproduce the nondeterministic behavior using the following steps:
     Clone the repo and cd into it.
   `mvn install -pl modules/configuration-governance -am -DskipTests`
   `mvn -pl modules/configuration-governance test -Dtest=com.ibm.cloud.platform_services.configuration_governance.v1.model.RuleRequestTest#testRuleRequest`
   `mvn -pl modules/configuration-governance edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=com.ibm.cloud.platform_services.configuration_governance.v1.model.RuleRequestTest#testRuleRequest`
   
   * I think I made a mistake in my previous descriptions. I think the real solve of flaky tests lies on the line `runner.setProperty(QueryDatabaseTableRecord.MAX_ROWS_PER_FLOW_FILE, "0");` due to some inconsistent or asychronized reading/writing. But I am not sure about this for now and still diving into the code to see what's the exact cause of this problem. I will let you know when I find more about it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6525: NIFI-10639 Fix testAddedRowsTwoTables

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6525:
URL: https://github.com/apache/nifi/pull/6525#issuecomment-1290733889

   Will review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org