Stops the test server
@returns {Promise}
339257
function stop() {
  return new Promise((resolve) => {
    if (child && child.kill) {
      debug('stopping test server');
      child.kill('SIGTERM');
      process.removeListener('exit', stop);
      child = null;
      debug('stopped test server');
    }

    resolve();
  });
}
767258
function shutdown(){
    // trigger stop on all workers
    // catch errors thrown by killed workers
    return Promise.all(Object.values(_cluster.workers).map(worker => stopWorker(worker).catch(err => _logger.error(err))));
}
1140117
function (browser) {
    // issue the kill command to the browser, when all tests are completed
    this.events.on('tests:complete:sauce:' + this.browserName, browser.kill.bind(browser));
    // clear the webdriver session, when all tests are completed
    this.events.on('tests:complete:sauce:' + this.browserName, this.webdriverClient.closeSession.bind(this.webdriverClient));
    return this;
  }
648086
public void stop() {
		if (serverThread != null) {
			try {
				//close and force IOException in server process
				server.close();
				//server thread will end as well
			} catch (IOException ioe) {
				System.out.println(new LogEntry(Level.CRITICAL, ioe.getMessage(), ioe));
			}
		}

		//close client connections as well
		for (Connection client : new HashSet<Connection>(connectedClients)) {
			if (!client.isClosed()) {
				client.close("server shut down...");
			}
		}
	}
1027130
function stop(next) {
    if (phantomProcess) {
        seleniumServerProcess.on('close', function (code, signal) {
            // this should really resolve both callbacks rather than guessing phantom wrapper will terminate instantly
            if (typeof next === 'function' && !seleniumServerProcess ) {
                next();
            }
        });
        // SIGTERM should ensure processes end cleanly, can do killall -9 java if getting startup errors
        phantomProcess.kill('SIGTERM');
        started = false;
        starting = false;
    }
    if (seleniumServerProcess) {
        seleniumServerProcess.on('close', function (code, signal) {
            if (typeof next === 'function' ) {
                // need to stub out the other callback
                next();
            }
        });
        seleniumServerProcess.kill('SIGTERM');
        started = false;
        starting = false;
    }
}
657587
public synchronized void stop() throws IOException {
		this.stopped = true;
		if (this.server != null && this.waitingClient) {
			this.server.close();
			this.server = null;
		}
	}
293328
function killServers(exitCode) {
  logger.info('Cleaning up running servers');

  if (seleniumServer) {
    logger.info('Closing selenium server');
    seleniumServer.kill();
    seleniumServer = null;
  }

  // Catch protractor's "Kitchen Sink" error.
  if (exitCode === 199) {
    logger.warn('Supressing protractor\'s "kitchen sink" error 199');
    exitCode = 0;
  }

  server.stop();
  logger.info(`Execution Time: ${(new Date().getTime() - start) / 1000} seconds`);
  logger.info(`Exiting process with ${exitCode}`);
  process.exit(exitCode || 0);
}
729494
def stop(self, wait=True):
        ''' 

        '''

        # TODO should probably close all connections and shut down all sessions here
        for context in self._applications.values():
            context.run_unload_hook()

        self._stats_job.stop()
        if self._mem_job is not None:
            self._mem_job.stop()
        self._cleanup_job.stop()
        if self._ping_job is not None:
            self._ping_job.stop()

        self._clients.clear()
1142841
def stop(self):
        
        if self.server.eio.async_mode == 'threading':
            func = flask.request.environ.get('werkzeug.server.shutdown')
            if func:
                func()
            else:
                raise RuntimeError('Cannot stop unknown web server')
        elif self.server.eio.async_mode == 'eventlet':
            raise SystemExit
        elif self.server.eio.async_mode == 'gevent':
            self.wsgi_server.stop()
793271
def stop(self):
        """"""

        msg = ''
        if self._process:
            _stop_process(self._process, 'Server process')
        else:
            msg += 'Server not started.\n'
        if msg:
            print(msg, end='')
980415
function stop(options, callback) {
  const args = utils.getArgs(options, [config], callback);
  const url = `http://${args.options.ip}:${args.options.port}/stop`;

  return request.get(url, function(err) {
    if (err && err.code !== "ECONNREFUSED") {
      return args.callback(err);
    }
    return args.callback(null);
  });
}
807011
function stop() {
        if($this->timer) {
            self::$loop->cancelTimer($this->timer);
            $this->timer = null;
        }
        
        $this->emitter->removeListener($this->event, $this->listener);
        
        $errors = (array) ($this->options['errors'] ?? array());
        if(\in_array('max', $errors, true) && ($this->options['max'] ?? 0) > 0 && $this->bucket->count() < $this->options['max']) {
            $reject = $this->reject;
            $reject(new \RangeException('Collecting timed out (max not reached in time)'));
            return;
        }
        
        $resolve = $this->resolve;
        $resolve($this->bucket);
    }
1301082
void stop() {
    if (!shouldRun(conf)) {
      return;
    }
    nodeHealthScriptScheduler.cancel();
    if (shexec != null) {
      Process p = shexec.getProcess();
      if (p != null) {
        p.destroy();
      }
    }
  }
190716
public void stop() {
    running = false;
    if (server != null) server.stop();
    if (aggregateDaemon != null) aggregateDaemon.interrupt();
  }
403343
function(app) {

  try {
    // make sure we close down within N seconds
    const killtimer = setTimeout(() => {
      process.exit(1);
    }, 3000);
    // But don't keep the process open just for that!
    killtimer.unref();

    // stop taking new requests.
    app.server.close();

  } catch (err) {
    // oh well, not much we can do at this point.
    console.error('Error shutting down gracefully!', err.stack);
  }
}
1080881
function runServer() {
  return new Promise(resolve => {
    function onStdOut(data) {
      const time = new Date().toTimeString();
      const match = data.toString('utf8').match(RUNNING_REGEXP);

      process.stdout.write(time.replace(/.*(\d{2}:\d{2}:\d{2}).*/, '[$1] '));
      process.stdout.write(data);

      if (match) {
        server.host = match[1];
        server.stdout.removeListener('data', onStdOut);
        server.stdout.on('data', x => process.stdout.write(x));
        pending = false;
        resolve(server);
      }
    }

    if (server) {
      server.kill('SIGTERM');
    }

    server = cp.spawn('node', [serverPath], {
      env: Object.assign({ NODE_ENV: 'development' }, process.env),
      silent: false,
    });

    if (pending) {
      server.once('exit', (code, signal) => {
        if (pending) {
          throw new Error(
            `Server terminated unexpectedly with code: ${code} signal: ${signal}`,
          );
        }
      });
    }

    server.stdout.on('data', onStdOut);
    server.stderr.on('data', x => process.stderr.write(x));

    return server;
  });
}
266000
def stop(self):
        
        self.my_server.stop()
        self.http_thread.join()
        logging.info("HTTP server: Stopped")