[
https://issues.apache.org/jira/browse/ZOOKEEPER-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496174#comment-17496174
]
Kezhu Wang commented on ZOOKEEPER-4327:
---------------------------------------
{{RequestThrottlerTest.testLargeRequestThrottling}} is flaky still. I saw two
kind of failures:
#
https://github.com/apache/zookeeper/runs/5008842173?check_suite_focus=true#step:7:957
{noformat}RequestThrottlerTest.testRequestThrottler:206 expected: <5> but
was: <4>{noformat}
#
https://github.com/apache/zookeeper/runs/5284250979?check_suite_focus=true#step:7:957
{noformat}RequestThrottlerTest.testLargeRequestThrottling:297 expected: <2>
but was: <0>{noformat}
For #1, I think it is caused by mistake in {{createCallback}}.
{code:java}
AsyncCallback.StringCallback createCallback = (rc, path, ctx, name) -> {
if (KeeperException.Code.get(rc) ==
KeeperException.Code.CONNECTIONLOSS) {
disconnected.countDown();
connectionLossCount++;
}
};
{code}
{{disconnected.countDown()}} should placed after {{connectionLossCount++}}, so
we can assert on {{connectionLossCount}} after {{disconnected.await}}. But I
think a more comfortable fix is to assert on result of {{disconnected.await}},
so timeout await can be easily figure out.
For #2, I think it is caused by synchronous request rejection in {{ServerCnxn}}
thread and asynchronous request submission in
{{RequestThrottler.submitRequest}}. I think we can fix this by moving metrics
read and assertion after {{finished.await}}.
[~eolivelli] [~maoling] What do you think ?
> Flaky test: RequestThrottlerTest
> --------------------------------
>
> Key: ZOOKEEPER-4327
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4327
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Ling Mao
> Assignee: Damien Diederen
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> URL:
> https://github.com/apache/zookeeper/pull/1702/checks?check_run_id=2848599299
> {code:java}
> [ERROR] Failures:
> 947[ERROR]
> RequestThrottlerTest.testGlobalOutstandingRequestThrottlingWithRequestThrottlerDisabled:340
> expected: <3> but was: <4>
> 948[INFO]
> 949[ERROR] Tests run: 2913, Failures: 1, Errors: 0, Skipped: 4
> {code}
> ===================================
>
> URL:
> [https://github.com/apache/zookeeper/pull/1709/checks?check_run_id=2884777341]
> {code:java}
> [INFO]
> 948[INFO] Results:
> 949[INFO]
> 950[ERROR] Failures:
> 951[ERROR]
> RequestThrottlerTest.testGlobalOutstandingRequestThrottlingWithRequestThrottlerDisabled:340
> expected: <3> but was: <7>
> 952[ERROR] RequestThrottlerTest.testLargeRequestThrottling:299 expected:
> <5> but was: <4>
> 953[INFO]
> 954[ERROR] Tests run: 2913, Failures: 2, Errors: 0, Skipped: 4
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)