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) {
160160 function checkAndTerminateWorker ( worker , callback ) {
161161 var next_path = getNextTestPath ( worker ) ;
162162 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 ) ;
165170 worker . test_path = next_path ;
166- bsClient . changeUrl ( worker . id , { url : new_url } , function ( ) {
171+ bsClient . changeUrl ( worker . id , { url : url } , function ( ) {
167172 callback ( true ) ;
168173 } ) ;
169174 } else {
You can’t perform that action at this time.
0 commit comments