Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
thread pain
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Aug 28, 2014
1 parent ce36956 commit 9d8a77c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/zc/zk/disconnectiontests.py
Expand Up @@ -153,17 +153,17 @@ def session_timeout_with_child_and_data_watchers():
If changes are made while we're disconnected, we'll still see them:
>>> @zk.client.lose_session
... def _():
... zk2 = zc.zk.ZooKeeper('zookeeper.example.com:2181')
... zk2.set('/fooservice', '{"test": 1}')
... zk2.create('/fooservice/y')
... zk2.close()
>>> if True:
... @zk.client.lose_session
... def _():
... zk2 = zc.zk.ZooKeeper('zookeeper.example.com:2181')
... zk2.set('/fooservice', '{"test": 1}')
... zk2.create('/fooservice/y')
... zk2.close()
... import time; time.sleep(1) # threads :/
properties changed True
children changed True
>>> import time; time.sleep(1)
Our handlers were called because data changed.
>>> dict(properties)
Expand Down

0 comments on commit 9d8a77c

Please sign in to comment.