hazelcast / hazelcast/hazelcast-python-client
NearCacheTestCase.test_put_get
- Lingua principale
- Python
- Stelle
- 116
- Fork
- 78
- Merge medio
- 10g 22h
- PR unite (30g)
- 1
Descrizione
Failed on nightly tests with Python 3.8 on Windows
```
self =
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
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da tests/unit/near_cache_test.py e dal caso di test non riuscito test_put_get, quindi esamina hazelcast/near_cache.py intorno a __getitem__. Riproduci il problema nell’ambiente nightly Windows con Python 3.8 e determina perché key-0 viene espulsa; il lavoro è completato quando il test passa in modo affidabile senza compromettere il comportamento della near-cache.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- distributed-systems, testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100