Flaky test: KeyBasedBatchingTest.testOrderingKeyPriority

未关闭
#173 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
cpp
领域
testing

调研方向

首先运行 KeySharedConsumerTest.testOrderingKeyPriority,并阅读 tests/KeySharedConsumerTest.cc 第 135 行附近的内容,那里会检查每个 consumer 的消息数量。将观察到的分布与预期容差进行比较,并调查 ordering-key priority test 间歇性失败的原因。在不削弱其顺序或分布检查的情况下,使测试能够可靠通过,即视为完成。

由索引模型根据 Issue 内容生成。

描述

example failure

FAILED TESTS (5/399):
     255 ms: ./pulsar-tests ClientTest.testReferenceCount (try #1)
     177 ms: ./pulsar-tests ClientTest.testReferenceCount (try #2)
     679 ms: ./pulsar-tests ClientTest.testReferenceCount (try #3)
     260 ms: ./pulsar-tests ClientTest.testReferenceCount (try #4)
    9421 ms: ./pulsar-tests KeySharedConsumerTest.testOrderingKeyPriority (try #1)

Run log:

[ RUN      ] KeySharedConsumerTest.testOrderingKeyPriority
2023-01-13 13:18:03.900 INFO  [139656847097536] ClientConnection:190 | [<none> -> pulsar://localhost:6650] Create ClientConnection, timeout=10000
2023-01-13 13:18:03.900 INFO  [139656847097536] ConnectionPool:97 | Created connection for pulsar://localhost:6650
2023-01-13 13:18:03.904 INFO  [139656843974208] ClientConnection:387 | [[::1]:56998 -> [::1]:6650] Connected to broker
2023-01-13 13:18:03.907 INFO  [139656843974208] HandlerBase:72 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, ] Getting connection from pool
2023-01-13 13:18:03.943 INFO  [139656843974208] ProducerImpl:202 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, ] Created producer on broker [[::1]:56998 -> [::1]:6650]
2023-01-13 13:18:03.943 INFO  [139656847097536] Client:87 | Subscribing on Topic :KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:03.944 INFO  [139656843974208] HandlerBase:72 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 0] Getting connection from pool
2023-01-13 13:18:03.958 INFO  [139656843974208] ConsumerImpl:239 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 0] Created consumer on broker [[::1]:56998 -> [::1]:6650]
2023-01-13 13:18:03.958 INFO  [139656847097536] Client:87 | Subscribing on Topic :KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:03.959 INFO  [139656843974208] HandlerBase:72 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 1] Getting connection from pool
2023-01-13 13:18:03.960 INFO  [13965684397[420](https://github.com/apache/pulsar-client-cpp/actions/runs/3911569384/jobs/6685111475#step:9:421)8] ConsumerImpl:239 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 1] Created consumer on broker [[::1]:56998 -> [::1]:6650]
2023-01-13 13:18:03.961 INFO  [139656847097536] Client:87 | Subscribing on Topic :KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:03.961 INFO  [139656843974208] HandlerBase:72 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 2] Getting connection from pool
2023-01-13 13:18:03.962 INFO  [139656843974208] ConsumerImpl:239 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 2] Created consumer on broker [[::1]:56998 -> [::1]:6650]
2023-01-13 13:18:13.157 INFO  [139656847097536] KeySharedConsumerTest:124 | messagesPerConsumer: {0 => 506, 1 => 217, 2 => 277}
/home/runner/work/pulsar-client-cpp/pulsar-client-cpp/tests/KeySharedConsumerTest.cc:135: Failure
Expected: (fabs(count - expectedMessagesPerConsumer)) < (expectedMessagesPerConsumer * PERCENT_ERROR), actual: 172.667 vs 166.667
2023-01-13 13:18:13.157 INFO  [139656847097536] ClientImpl:535 | Closing Pulsar client with 1 producers and 3 consumers
2023-01-13 13:18:13.157 INFO  [139656847097536] ProducerImpl:742 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, standalone-0-377] Closing producer for topic persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:13.158 INFO  [139656847097536] ConsumerImpl:1119 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 2] Closing consumer for topic persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:13.158 INFO  [139656843974208] ProducerImpl:706 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, standalone-0-377] Closed producer 0
2023-01-13 13:18:13.158 INFO  [139656847097536] ConsumerImpl:1119 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 1] Closing consumer for topic persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:13.158 INFO  [139656843974208] ConsumerImpl:1105 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 2] Closed consumer 2
2023-01-13 13:18:13.159 INFO  [139656847097536] ConsumerImpl:1119 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 0] Closing consumer for topic persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883
2023-01-13 13:18:13.159 INFO  [139656843974208] ConsumerImpl:1105 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 1] Closed consumer 1
2023-01-13 13:18:13.159 INFO  [139656843974208] ConsumerImpl:1105 | [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, SubscriptionName, 0] Closed consumer 0
2023-01-13 13:18:13.160 INFO  [139656793630272] ClientConnection:1648 | [[::1]:56998 -> [::1]:6650] Connection disconnected
2023-01-13 13:18:13.160 INFO  [139656793630272] ClientConnection:268 | [[::1]:56998 -> [::1]:6650] Destroyed connection
2023-01-13 13:18:13.161 INFO  [139656847097536] ProducerImpl:699 | Producer - [persistent://public/default/KeySharedConsumerTest-ordering-key-priority1673615883, standalone-0-377] , [batching  = off]
[  FAILED  ] KeySharedConsumerTest.testOrderingKeyPriority (9262 ms)
[----------] 1 test from KeySharedConsumerTest (9262 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (9262 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] KeySharedConsumerTest.testOrderingKeyPriority
主要语言
C++
星标
72
派生
93
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/pulsar-client-cpp 的其他 Issue

查看 apache/pulsar-client-cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。