##// END OF EJS Templates
tests: use more random ports created at start of rc-web server to stabilize the tests.
marcink -
r2614:803cf0e0 default
parent child Browse files
Show More
@@ -106,9 +106,10 b' def rc_web_server_config_factory(testini'
106 Configuration file used for the fixture `rc_web_server`.
106 Configuration file used for the fixture `rc_web_server`.
107 """
107 """
108
108
109 def factory(vcsserver_port):
109 def factory(rcweb_port, vcsserver_port):
110 custom_params = [
110 custom_params = [
111 {'handler_console': {'level': 'DEBUG'}},
111 {'handler_console': {'level': 'DEBUG'}},
112 {'server:main': {'port': rcweb_port}},
112 {'app:main': {'vcs.server': 'localhost:%s' % vcsserver_port}}
113 {'app:main': {'vcs.server': 'localhost:%s' % vcsserver_port}}
113 ]
114 ]
114 custom_params.extend(rc_web_server_config_modification)
115 custom_params.extend(rc_web_server_config_modification)
@@ -123,6 +124,8 b' def rc_web_server('
123 """
124 """
124 Run the web server as a subprocess. with it's own instance of vcsserver
125 Run the web server as a subprocess. with it's own instance of vcsserver
125 """
126 """
127 rcweb_port = available_port_factory()
128 print('Using rcweb ops test port {}'.format(rcweb_port))
126
129
127 vcsserver_port = available_port_factory()
130 vcsserver_port = available_port_factory()
128 print('Using vcsserver ops test port {}'.format(vcsserver_port))
131 print('Using vcsserver ops test port {}'.format(vcsserver_port))
@@ -138,6 +141,7 b' def rc_web_server('
138
141
139 rc_log = os.path.join(tempfile.gettempdir(), 'rc_op_web.log')
142 rc_log = os.path.join(tempfile.gettempdir(), 'rc_op_web.log')
140 rc_web_server_config = rc_web_server_config_factory(
143 rc_web_server_config = rc_web_server_config_factory(
144 rcweb_port=rcweb_port,
141 vcsserver_port=vcsserver_port)
145 vcsserver_port=vcsserver_port)
142 server = RcWebServer(rc_web_server_config, log_file=rc_log)
146 server = RcWebServer(rc_web_server_config, log_file=rc_log)
143 server.start()
147 server.start()
General Comments 0
You need to be logged in to leave comments. Login now