Flaky: map_nearcache_test.py::MapTest::test_invalidate_nonexist_key

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
testing

调研方向

Start with tests/integration/backward_compatible/proxy/map_nearcache_test.py, especially MapTest.test_invalidate_nonexist_key and the reported assertion near line 90. Run that test in the compatibility suite and inspect how the near cache changes after the JavaScript map operations. Done means the test reliably preserves the expected cache size of 10 and the compatibility suite passes.

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

描述

Type: Test-Failure

Test failure at compatibility test run: https://github.com/hazelcast/client-compatibility-suites/actions/runs/40719377083/job/122936352327

=================================== FAILURES ===================================
_____________________ MapTest.test_invalidate_nonexist_key _____________________

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

    def test_invalidate_nonexist_key(self):
        self.fill_map_and_near_cache(10)
        initial_cache_size = len(self.map._wrapped._near_cache)
        script = """
        var map = instance_0.getMap("%s");
        map.put("key-99","x");
        map.put("key-NonExist","x");
        map.remove("key-NonExist");""" % self.map.name
    
        response = self.rc.executeOnController(self.cluster.id, script, Lang.JAVASCRIPT)
        self.assertTrue(response.success)
>       self.assertEqual(initial_cache_size, 10)
E       AssertionError: 9 != 10

master/tests/integration/backward_compatible/proxy/map_nearcache_test.py:90: AssertionError
=============================== warnings summary ===============================
master/hazelcast/reactor.py:2
  /home/runner/work/client-compatibility-suites/client-compatibility-suites/master/hazelcast/reactor.py:2: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
    import asyncore

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED master/tests/integration/backward_compatible/proxy/map_nearcache_test.py::MapTest::test_invalidate_nonexist_key - AssertionError: 9 != 10
= 1 failed, 1254 passed, 20 skipped, 181 deselected, 1 warning in 180.05s (0:03:00) =
主要语言
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 摘要。