File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,15 @@ exports.Server = function Server(bsClient, workers) {
160
160
function checkAndTerminateWorker ( worker , callback ) {
161
161
var next_path = getNextTestPath ( worker ) ;
162
162
if ( next_path ) {
163
- var new_url = 'http://localhost:' + 8888 + '/' + next_path
164
- + "?_worker_key=" + worker . _worker_key + "&_browser_string=" + getTestBrowserInfo ( worker ) ;
163
+ var url = 'http://localhost:' + 8888 + '/' + next_path ;
164
+ if ( url . indexOf ( '?' ) > 0 ) {
165
+ url += '&' ;
166
+ } else {
167
+ url += '?' ;
168
+ }
169
+ url += "_worker_key=" + worker . _worker_key + "&_browser_string=" + getTestBrowserInfo ( worker ) ;
165
170
worker . test_path = next_path ;
166
- bsClient . changeUrl ( worker . id , { url : new_url } , function ( ) {
171
+ bsClient . changeUrl ( worker . id , { url : url } , function ( ) {
167
172
callback ( true ) ;
168
173
} ) ;
169
174
} else {
You can’t perform that action at this time.
0 commit comments