[API-2275] Flaky test: map_nearcache_test.MapTest.test_invalidate_single_key

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

还没有人认领这个 Issue。

评估

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

调研方向

从 tests/integration/backward_compatible/proxy/map_nearcache_test.py 开始,尤其检查 MapTest.test_invalidate_single_key,并查看 tests/base.py 中的 assertTrueEventually。使用 issue 中链接的、针对 Hz 5.3.8 的 Compatibility-Suite 重现该失败。当测试能够可靠地观察到 near-cache 大小从 10 变为 9 时,即表示完成。

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

描述

to-jira Type: Test-Failure

This test failed in the compatibility suite for Hz 5.3.8:
https://github.com/hazelcast/client-compatibility-suites/actions/runs/15042583719/job/42277600444

=================================== FAILURES ===================================
______________________ MapTest.test_invalidate_single_key ______________________

self = <tests.integration.backward_compatible.proxy.map_nearcache_test.MapTest testMethod=test_invalidate_single_key>

    def test_invalidate_single_key(self):
        self.fill_map_and_near_cache(10)
        initial_cache_size = len(self.map._wrapped._near_cache)
        script = """map = instance_0.getMap("{}");map.remove("key-5")""".format(self.map.name)
        response = self.rc.executeOnController(self.cluster.id, script, Lang.PYTHON)
        self.assertTrue(response.success)
        self.assertEqual(initial_cache_size, 10)
    
        def assertion():
            self.assertEqual(len(self.map._wrapped._near_cache), 9)
    
>       self.assertTrueEventually(assertion)

tests/integration/backward_compatible/proxy/map_nearcache_test.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/base.py:76: in assertTrueEventually
    raise last_exception
tests/base.py:67: in assertTrueEventually
    assertion()
tests/integration/backward_compatible/proxy/map_nearcache_test.py:75: in assertion
    self.assertEqual(len(self.map._wrapped._near_cache), 9)
E   AssertionError: 10 != 9
=========================== short test summary info ============================
FAILED tests/integration/backward_compatible/proxy/map_nearcache_test.py::MapTest::test_invalidate_single_key
============ 1 failed, [142](https://github.com/hazelcast/client-compatibility-suites/actions/runs/15042583719/job/42277600444#step:15:143)1 passed, 32 skipped in 446.89s (0:07:26) ============
主要语言
Python
星标
115
派生
78
平均合并
2 天 23 小时
30 天内合并 PR
2

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

hazelcast/hazelcast-python-client 的其他 Issue

查看 hazelcast/hazelcast-python-client 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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