Implement upcoming query on store
This commit is contained in:
parent
a6e48d93a8
commit
04dfb185ce
@ -95,3 +95,8 @@ class Store:
|
||||
entry.retry()
|
||||
except StateTransitionInvalid:
|
||||
entry.readysend()
|
||||
|
||||
|
||||
def fail(self, k):
|
||||
entry = QueueEntry(self, k)
|
||||
entry.reject()
|
||||
|
@ -43,7 +43,7 @@ class TestIntegrateBase(TestShepBase):
|
||||
self.store.put(b'foo'.hex(), b'bar'.hex(), cache_adapter=MockCacheTokenTx)
|
||||
|
||||
|
||||
def test_state_move(self):
|
||||
def test_state_enqueu(self):
|
||||
hx = b'foo'.hex()
|
||||
self.store.put(hx, b'bar'.hex(), cache_adapter=MockCacheTokenTx)
|
||||
self.store.get(hx)
|
||||
@ -53,5 +53,12 @@ class TestIntegrateBase(TestShepBase):
|
||||
self.assertEqual(v[0], hx)
|
||||
|
||||
|
||||
def test_state_defer(self):
|
||||
hx = b'foo'.hex()
|
||||
self.store.put(hx, b'bar'.hex(), cache_adapter=MockCacheTokenTx)
|
||||
self.store.get(hx)
|
||||
self.store.fail(hx)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user