docstr: Test starting up an external server with long response time (20 seconds) and accessing with a client with start_server=StartServer.DONT_START and timeout=5000
docstr_tok: ["Test","starting","up","an","external","server","with","long","response","time","(","20","seconds",")","and","accessing","with","a","client","with","start_server=StartServer.DONT_START","and","timeout=5000"]
code: def test_external_server_timeout(self):
      """Test starting up an external server with long response time (20 seconds) and accessing with a client with start_server=StartServer.DONT_START and timeout=5000"""
      with HTTPMockServerTimeoutContext(9001, 20):
          time.sleep(
              5
          )  # wait and make sure the external HTTPMockServer server is up and running
          with pytest.raises(corenlp.TimeoutException):
              with corenlp.CoreNLPClient(
                  start_server=corenlp.StartServer.DONT_START,
                  endpoint="http://localhost:9001",
                  timeout=5000,
              ) as external_server_client:
                  ann = external_server_client.annotate(
                      TEXT,
                      annotators="tokenize,ssplit,pos",
                      output_format="text",
                  )
  
imports: from http.server import BaseHTTPRequestHandler, HTTPServer
  import multiprocessing
  import pytest
  import requests
  import stanza.server
  import stanza.server.client
  import shlex
  import subprocess
  import time
  from stanza.models.constituency import tree_reader
  from stanza.tests import *
label_desc: Use image node_id 15 for calling the TestCoreNLPClient obj's underlying member method code with example usage: obj.test_external_server_timeout() without return types