You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "equanz (via GitHub)" <gi...@apache.org> on 2023/11/07 07:29:26 UTC

[PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

equanz opened a new pull request, #21532:
URL: https://github.com/apache/pulsar/pull/21532

   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://pulsar.apache.org/contribute/develop-semantic-title/)*. 
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   -->
   
   ### Motivation
   
   It seems some test cases like `**/*Test2.java` aren't run on the default test lifecycle.
   This issue is caused by https://github.com/apache/pulsar/pull/10148 .
   
   This issue was fixed by changing test file name as follows. However, some developers committed unexpected file name after them.
   * https://github.com/apache/pulsar/pull/13644
   * https://github.com/apache/pulsar/pull/17767
   
   ### Modifications
   
   * Modify surefire include target to `*`
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "equanz (via GitHub)" <gi...@apache.org>.
equanz commented on code in PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#discussion_r1387845219


##########
pom.xml:
##########
@@ -85,7 +85,7 @@ flexible messaging model and an intuitive client API.</description>
     <pulsar.client.python.version>3.2.0</pulsar.client.python.version>
 
     <!--config keys to configure test selection -->
-    <include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
+    <include>*</include>

Review Comment:
   Thank you for the explanation. After reading your description, I now agree with the current setting. I'll only modify the existing class name in this PR, such as `**/*Test2.java`.
   
   By the way, I already noticed two patterns before publishing this PR.
   
   * `Test` suffix is missing in a class name
     - They can't be filtered by class name.
   * extra suffix is added
     - e.g. `**/*Test2.java`
     - They may be filtered by class name.



-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #21532:
URL: https://github.com/apache/pulsar/pull/21532


-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#discussion_r1387537522


##########
pom.xml:
##########
@@ -85,7 +85,7 @@ flexible messaging model and an intuitive client API.</description>
     <pulsar.client.python.version>3.2.0</pulsar.client.python.version>
 
     <!--config keys to configure test selection -->
-    <include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
+    <include>*</include>

Review Comment:
   Let's make this more restrictive since it was the default for Surefire, see https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html#inclusions .
   
   Making it * results in scanning all class files, also class files for lambdas and inner classes.
   That was the reason why I changed it a long time ago.



-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#issuecomment-1805610776

   /pulsarbot rerun-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "equanz (via GitHub)" <gi...@apache.org>.
equanz commented on code in PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#discussion_r1389036186


##########
pom.xml:
##########
@@ -85,7 +85,7 @@ flexible messaging model and an intuitive client API.</description>
     <pulsar.client.python.version>3.2.0</pulsar.client.python.version>
 
     <!--config keys to configure test selection -->
-    <include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
+    <include>*</include>

Review Comment:
   I found omitted tests by following commands.
   ```
   $ find . ! -name '*Test*' -name "*.java" -exec grep -H "@Test" {} \;
   $ find . -regextype posix-basic -regex '.*/[^/]\+Test[^/]\+\.java$' ! -regex '.*Test\(s\)\?.java$' -exec grep -H "@Test" {} \;
   ```
   
   exceptions:
   * abstract classes
   * org.apache.pulsar.metadata.MetadataBenchmark
     - It doesn't have to run in unit tests.
   * backward compatibility tests
     - e.g. `SmokeTest2_5.java`



-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "equanz (via GitHub)" <gi...@apache.org>.
equanz commented on PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#issuecomment-1803055596

   @lhotari Could you check this changes?


-- 
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: commits-unsubscribe@pulsar.apache.org

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


Re: [PR] [fix][test] Fix that some test cases are not running as expected on CI [pulsar]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #21532:
URL: https://github.com/apache/pulsar/pull/21532#issuecomment-1806482790

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/21532?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#21532](https://app.codecov.io/gh/apache/pulsar/pull/21532?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (f0b8805) into [master](https://app.codecov.io/gh/apache/pulsar/commit/922525f55396f8dfdb2ee6c67a0a4c7f09603772?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (922525f) will **increase** coverage by `0.14%`.
   > Report is 12 commits behind head on master.
   > The diff coverage is `81.25%`.
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/21532/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/21532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #21532      +/-   ##
   ============================================
   + Coverage     73.11%   73.25%   +0.14%     
   - Complexity    32619    32683      +64     
   ============================================
     Files          1890     1892       +2     
     Lines        140556   140712     +156     
     Branches      15454    15478      +24     
   ============================================
   + Hits         102762   103079     +317     
   + Misses        29702    29531     -171     
   - Partials       8092     8102      +10     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pulsar/pull/21532/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [inttests](https://app.codecov.io/gh/apache/pulsar/pull/21532/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.08% <0.00%> (?)` | |
   | [systests](https://app.codecov.io/gh/apache/pulsar/pull/21532/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.70% <0.00%> (-0.01%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pulsar/pull/21532/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.54% <81.25%> (+0.04%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files](https://app.codecov.io/gh/apache/pulsar/pull/21532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/pulsar/client/impl/TableViewImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/21532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0ltcGwuamF2YQ==) | `86.33% <81.25%> (-0.18%)` | :arrow_down: |
   
   ... and [102 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/21532/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: commits-unsubscribe@pulsar.apache.org

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