testserver.py and persistent connections?

10 views
Skip to first unread message

Demetrios Tsillas

unread,
May 22, 2017, 4:24:17 PM5/22/17
to Chromium-dev
I'm using the spawned test server to design some browser_tests which load resources and collect some data..

One test invokes a second http testserver and loads singleton objects from this server.

I noticed that when my test page loads singleton objects it does not reuse the connection, which would normally be the case for a modern server.

Is there a way to get persistent connection from testserver?

thanks!!!
-Jim.

Matthew Menke

unread,
May 22, 2017, 10:41:04 PM5/22/17
to Chromium-dev
No, there's not.  testserver.py is rather dysfunctional, and not really supported or maintained.  EmbeddedTestServer is the new way to do things (Though it also doesn't support multiple requests on a socket, it does, at least, support multiple requests at the same time on different sockets, which testserver.py does not).

Demetrios Tsillas

unread,
May 23, 2017, 7:29:27 AM5/23/17
to Chromium-dev
Documentation on BaseHTTPServer (which testserver is based on) claims that persistent connection are supported once HTTP/1.1 is specified. Although the content-length must now be supplied in every header. I understand that EmbeddedTestServer is the preferred option today.

thanks!!!
Reply all
Reply to author
Forward
0 new messages