#NEWLINE# def test_child_watch_session_loss( self ) : #NEWLINE# #INDENT# update = threading . Event ( ) #NEWLINE# all_children = [ 'fred' ] #NEWLINE# @ self . client . ChildrenWatch ( self . path ) #NEWLINE# def changed( children ) : #NEWLINE# #INDENT# while all_children : #NEWLINE# #INDENT# all_children . pop ( ) #NEWLINE# #UNINDENT# all_children . extend ( children ) #NEWLINE# update . set ( ) #NEWLINE# #UNINDENT# update . wait ( 10 ) #NEWLINE# eq_ ( update , [ ] ) #NEWLINE# update . clear ( ) #NEWLINE# self . client . create ( ( ( self . path + '/' ) + 'smith' ) ) #NEWLINE# update . wait ( 10 ) #NEWLINE# eq_ ( all_children , [ 'smith' ] ) #NEWLINE# update . clear ( ) #NEWLINE# self . expire_session ( ) #NEWLINE# self . client . retry ( self . client . create , ( ( self . path + '/' ) + 'george' ) ) #NEWLINE# update . wait ( 20 ) #NEWLINE# eq_ ( sorted ( all_children ) , [ 'george' , 'smith' ] )