You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/08 07:30:15 UTC
[GitHub] [pulsar] poorbarcode opened a new pull request, #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
poorbarcode opened a new pull request, #16984:
URL: https://github.com/apache/pulsar/pull/16984
Fixes #16521
Master Issue: #16521
### Motivation
In `BrokerServiceTest.testLookupThrottlingForClientByClient`, if the broker responds and client handle response quickly enough, this test will fail.
### Modifications
Add a signal to control the execution speed of "client handle response". The logic is almost like #16540
### Documentation
- [ ] `doc-required`
(Your PR needs to update docs and you will update later)
- [x] `doc-not-needed`
(Please explain why)
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `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] AnonHxy commented on pull request #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
Posted by GitBox <gi...@apache.org>.
AnonHxy commented on PR #16984:
URL: https://github.com/apache/pulsar/pull/16984#issuecomment-1207838140
> @AnonHxy
>
> Sorry, the PR is very similar to the PR you submitted last time, you can reopen the closed PR ##16540, and notice me close this.
OK. I have already reopen https://github.com/apache/pulsar/pull/16540 @poorbarcode
--
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] poorbarcode commented on pull request #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16984:
URL: https://github.com/apache/pulsar/pull/16984#issuecomment-1207770616
@AnonHxy
Sorry, the PR is very similar to the PR you submitted last time, you can reopen the closed PR #https://github.com/apache/pulsar/pull/16540, and notice me close this.
--
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] Technoboy- commented on a diff in pull request #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
Posted by GitBox <gi...@apache.org>.
Technoboy- commented on code in PR #16984:
URL: https://github.com/apache/pulsar/pull/16984#discussion_r940045373
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java:
##########
@@ -1073,7 +1086,28 @@ public void testLookupThrottlingForClientByClient() throws Exception {
throw e;
}
}
+ }
+ }
+ private static class BlockLookupResponseClientCnx extends ClientCnx{
+
+ private AtomicBoolean blocking;
+
+ public BlockLookupResponseClientCnx(ClientConfigurationData conf, EventLoopGroup eventLoopGroup, AtomicBoolean blocking) {
+ super(conf, eventLoopGroup);
+ this.blocking = blocking;
+ }
+
+ protected void handleLookupResponse(CommandLookupTopicResponse lookupResult) {
+ while (blocking.get()){
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
Review Comment:
Semaphore is better than sleep in this case.
--
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] poorbarcode closed pull request #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
Posted by GitBox <gi...@apache.org>.
poorbarcode closed pull request #16984: [fix][flaky-test]BrokerServiceTest.testLookupThrottlingForClientByClient
URL: https://github.com/apache/pulsar/pull/16984
--
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