#NEWLINE# def test_queue_timeout( self ) : #NEWLINE# #INDENT# with closing ( self . create_client ( max_clients = 1 ) ) as client : #NEWLINE# #INDENT# client . fetch ( self . get_url ( '/trigger' ) , self . stop , request_timeout = 10 ) #NEWLINE# self . wait ( ) #NEWLINE# client . fetch ( self . get_url ( '/hello' ) , self . stop , connect_timeout = 0.1 ) #NEWLINE# response = self . wait ( ) #NEWLINE# self . assertEqual ( response . code , 599 ) #NEWLINE# self . assertTrue ( ( response . request_time < 1 ) , response . request_time ) #NEWLINE# self . assertEqual ( str ( response . error ) , 'HTTP 599: Timeout in request queue' ) #NEWLINE# self . triggers . popleft ( ) ( ) #NEWLINE# self . wait ( )