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

[GitHub] [pulsar] lhotari opened a new pull request, #20434: [fix][test] Fix flaky PersistentSubscriptionTest

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

   Fixes #19396
   
   ### Motivation
   
   PersistentSubscriptionTest.setup is flaky because Mockito isn't thread safe. 
   
   ### Modifications
   
   Replace the usage of Mockito for setting the TransactionBufferProvider and TransactionPendingAckStoreProvider
   in the test.
   
   ### 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 -->


-- 
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


[GitHub] [pulsar] codecov-commenter commented on pull request #20434: [fix][test] Fix flaky PersistentSubscriptionTest

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

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#20434](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (36ac8f5) into [master](https://app.codecov.io/gh/apache/pulsar/commit/b5ef09e537ddb24419e9ad05b1dc940ab10ea70a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (b5ef09e) will **decrease** coverage by `0.04%`.
   > The diff coverage is `62.50%`.
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/20434/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/20434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #20434      +/-   ##
   ============================================
   - Coverage     72.92%   72.89%   -0.04%     
   + Complexity    31897    31868      -29     
   ============================================
     Files          1865     1865              
     Lines        138439   138443       +4     
     Branches      15192    15192              
   ============================================
   - Hits         100953   100914      -39     
   - Misses        29474    29503      +29     
   - Partials       8012     8026      +14     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.09% <12.50%> (-0.07%)` | :arrow_down: |
   | systests | `24.97% <0.00%> (+0.09%)` | :arrow_up: |
   | unittests | `72.17% <62.50%> (-0.05%)` | :arrow_down: |
   
   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.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...ker/service/persistent/PersistentSubscription.java](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvUGVyc2lzdGVudFN1YnNjcmlwdGlvbi5qYXZh) | `75.43% <50.00%> (ø)` | |
   | [...rg/apache/pulsar/io/kafka/KafkaAbstractSource.java](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FBYnN0cmFjdFNvdXJjZS5qYXZh) | `69.06% <60.00%> (+0.17%)` | :arrow_up: |
   | [...n/java/org/apache/pulsar/broker/PulsarService.java](https://app.codecov.io/gh/apache/pulsar/pull/20434?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9QdWxzYXJTZXJ2aWNlLmphdmE=) | `81.88% <100.00%> (+0.11%)` | :arrow_up: |
   
   ... and [73 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/20434/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


[GitHub] [pulsar] lhotari commented on a diff in pull request #20434: [fix][test] Fix flaky PersistentSubscriptionTest

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -248,7 +248,7 @@ public class PulsarService implements AutoCloseable, ShutdownService {
     private MetricsGenerator metricsGenerator;
 
     private TransactionMetadataStoreService transactionMetadataStoreService;
-    private TransactionBufferProvider transactionBufferProvider;
+    protected TransactionBufferProvider transactionBufferProvider;

Review Comment:
   thanks, that's a good suggestion. I'll use the setters and revert the change to make the fields protected.



-- 
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


[GitHub] [pulsar] tisonkun commented on a diff in pull request #20434: [fix][test] Fix flaky PersistentSubscriptionTest

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -248,7 +248,7 @@ public class PulsarService implements AutoCloseable, ShutdownService {
     private MetricsGenerator metricsGenerator;
 
     private TransactionMetadataStoreService transactionMetadataStoreService;
-    private TransactionBufferProvider transactionBufferProvider;
+    protected TransactionBufferProvider transactionBufferProvider;

Review Comment:
   Isn't the setter alread `protected`?
   
   ```java
   @Getter(AccessLevel.PUBLIC)
   @Setter(AccessLevel.PROTECTED)
   ```



-- 
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


[GitHub] [pulsar] lhotari merged pull request #20434: [fix][test] Fix flaky PersistentSubscriptionTest

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


-- 
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