'This is very related with the tests at:
w3af/core/data/url/tests/test_xurllib.py
Very similar test is TestXUrllib.test_timeout
:see: https://github.com/andresriancho/w3af/issues/7112'

def test_http_timeout_with_plugin(self):

    upper_daemon = UpperDaemon(TimeoutTCPHandler)
    upper_daemon.start()
    upper_daemon.wait_for_start()
    port = upper_daemon.get_port()
    url = URL(('http://127.0.0.1:%s/' % port))
    freq = FuzzableRequest(url)
    plugin_inst = self.w3af.plugins.get_plugin_inst('audit', 'sqli')
    plugin_inst._uri_opener.settings.set_configured_timeout(1)
    plugin_inst._uri_opener.clear_timeout()
    resp = plugin_inst.get_original_response(freq)
    self.assertEqual(resp.get_url(), url)
    self.assertEqual(resp.get_code(), 204)
    plugin_inst._uri_opener.settings.set_default_values()
