Skip to content

Commit 4c33288

Browse files
committed
Added a unit test for symmetric connect mode.
Working on #174 NOTE: Test is currently broken! (But for a different reason from #174. There's an assert trying to set a configuration variable that is locked.)
1 parent 7c98377 commit 4c33288

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/test_p2p.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ def ClientServerTest():
9797
client1.join( timeout=20 )
9898
client2.join( timeout=20 )
9999

100+
def SymmetricTest():
101+
print( "Running socket symmetric test" )
102+
103+
client1 = StartClientInThread( "symmetric", "alice", "bob" )
104+
client2 = StartClientInThread( "symmetric", "bob", "alice" )
105+
106+
# Wait for clients to shutdown. Nuke them if necessary
107+
client1.join( timeout=20 )
108+
client2.join( timeout=20 )
109+
100110
#
101111
# Main
102112
#
@@ -105,8 +115,7 @@ def ClientServerTest():
105115
signaling = StartProcessInThread( "signaling", [ './trivial_signaling_server' ] )
106116

107117
# Run the tests
108-
# FIXME - Add more tests
109-
for test in [ ClientServerTest ]:
118+
for test in [ ClientServerTest, SymmetricTest ]:
110119
print( "=================================================================" )
111120
print( "=================================================================" )
112121
test()

0 commit comments

Comments
 (0)