NearCacheTestCase.test_put_get

オープン
#515 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

tests/unit/near_cache_test.py と失敗しているテストケース test_put_get から始め、次に getitem 周辺の hazelcast/near_cache.py を調べてください。Python 3.8 の Windows nightly 環境で失敗を再現し、key-0 が追い出される理由を特定してください。テストが安定して成功し、near-cache の動作を壊さないことが完了の条件です。

索引モデルが issue の本文から書いたものです。

説明

Source: Internal Type: Test-Failure

Failed on nightly tests with Python 3.8 on Windows

self = <tests.unit.near_cache_test.NearCacheTestCase testMethod=test_put_get>

    def test_put_get(self):
        near_cache = self.create_near_cache(
            self.service, InMemoryFormat.OBJECT, 100, 100, EvictionPolicy.LRU, 100
        )
        for i in range(0, 120):
            key = "key-{}".format(i)
            value = "value-{}".format(i)
            near_cache[key] = value
            self.assertEqual(value, near_cache[key])
>           self.assertEqual("value-0", near_cache["key-0"])  # prevent its eviction

tests\unit\near_cache_test.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hazelcast\near_cache.py:161: in __getitem__
    raise ke
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = NearCache(len=100, evicted=1), key = 'key-0'

    def __getitem__(self, key):
        try:
>           value_record = super(NearCache, self).__getitem__(key)
E           KeyError: 'key-0'

hazelcast\near_cache.py:155: KeyError
主要言語
Python
スター
115
フォーク
78
平均マージ
2日 23時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hazelcast/hazelcast-python-client のほかの issue

hazelcast/hazelcast-python-client の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。