Skip to content

Commit 22f5486

Browse files
committed
[tests] fix race conditions in issue6231-linux-websocket-more-than-2-connections
1 parent 5b39016 commit 22f5486

File tree

1 file changed

+6
-4
lines changed
  • test/sanity/issue6231-linux-websocket-more-than-2-connections

1 file changed

+6
-4
lines changed

test/sanity/issue6231-linux-websocket-more-than-2-connections/test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import shutil
44
import platform
55
import sys
6+
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
7+
from nw_util import *
68

79
if platform.system() != 'Linux':
810
print 'Skipped for non Linux platform'
@@ -20,16 +22,16 @@
2022
try:
2123
print driver.current_url
2224

23-
result1 = driver.find_element_by_id('socket1').get_attribute('innerText')
25+
result1 = wait_for_element_id(driver, 'socket1')
2426
assert('Socket 1 open' in result1)
2527

26-
result2 = driver.find_element_by_id('socket2').get_attribute('innerText')
28+
result2 = wait_for_element_id(driver, 'socket2')
2729
assert('Socket 2 open' in result2)
2830

29-
result3 = driver.find_element_by_id('socket3').get_attribute('innerText')
31+
result3 = wait_for_element_id(driver, 'socket3')
3032
assert('Socket 3 open' in result3)
3133

32-
result4 = driver.find_element_by_id('socket4').get_attribute('innerText')
34+
result4 = wait_for_element_id(driver, 'socket4')
3335
assert('Socket 4 open' in result4)
3436
finally:
3537
driver.quit()

0 commit comments

Comments
 (0)