diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py
index 6c223990cadc5f71b68cd30c28b96544576ed7d6..493143641b04cdbb979c7dd932e4144c4010e50c 100755
--- a/indra/llcorehttp/tests/test_llcorehttp_peer.py
+++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py
@@ -34,7 +34,6 @@
 import time
 import select
 import getopt
-from threading import Thread
 try:
     from cStringIO import StringIO
 except ImportError:
@@ -48,7 +47,7 @@
 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
                              "llmessage", "tests"))
 
-from testrunner import run, debug, VERBOSE
+from testrunner import freeport, run, debug, VERBOSE
 
 class TestHTTPRequestHandler(BaseHTTPRequestHandler):
     """This subclass of BaseHTTPRequestHandler is to receive and echo
@@ -297,9 +296,18 @@ def handle_error(self, request, client_address):
         if option == "-V" or option == "--valgrind":
             do_valgrind = True
 
-    # Instantiate a Server(TestHTTPRequestHandler) on a port chosen by the
-    # runtime.
-    httpd = Server(('127.0.0.1', 0), TestHTTPRequestHandler)
+    # function to make a server with specified port
+    make_server = lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler)
+
+    if not sys.platform.startswith("win"):
+        # Instantiate a Server(TestHTTPRequestHandler) on a port chosen by the
+        # runtime.
+        httpd = make_server(0)
+    else:
+        # "Then there's Windows"
+        # Instantiate a Server(TestHTTPRequestHandler) on the first free port
+        # in the specified port range.
+        httpd, port = freeport(xrange(8000, 8020), make_server)
 
     # Pass the selected port number to the subject test program via the
     # environment. We don't want to impose requirements on the test program's
diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py
index 8e1204fb20c607f49bd0dbf45563d6f4ff8f626a..9cd2959ea18e59b1999ca72cfeb2ecfd5cfa99ec 100755
--- a/indra/llmessage/tests/test_llsdmessage_peer.py
+++ b/indra/llmessage/tests/test_llsdmessage_peer.py
@@ -31,12 +31,11 @@
 
 import os
 import sys
-from threading import Thread
 from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
 
 from llbase.fastest_elementtree import parse as xml_parse
 from llbase import llsd
-from testrunner import run, debug, VERBOSE
+from testrunner import freeport, run, debug, VERBOSE
 import time
 
 _storage=None
@@ -155,9 +154,19 @@ class Server(HTTPServer):
     allow_reuse_address = False
 
 if __name__ == "__main__":
-    # Instantiate a Server(TestHTTPRequestHandler) on a port chosen by the
-    # runtime.
-    httpd = Server(('127.0.0.1', 0), TestHTTPRequestHandler)
+    # function to make a server with specified port
+    make_server = lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler)
+
+    if not sys.platform.startswith("win"):
+        # Instantiate a Server(TestHTTPRequestHandler) on a port chosen by the
+        # runtime.
+        httpd = make_server(0)
+    else:
+        # "Then there's Windows"
+        # Instantiate a Server(TestHTTPRequestHandler) on the first free port
+        # in the specified port range.
+        httpd, port = freeport(xrange(8000, 8020), make_server)
+
     # Pass the selected port number to the subject test program via the
     # environment. We don't want to impose requirements on the test program's
     # command-line parsing -- and anyway, for C++ integration tests, that's
diff --git a/indra/newview/tests/test_llxmlrpc_peer.py b/indra/newview/tests/test_llxmlrpc_peer.py
index 12394ad1d94c5c02d6557586f1944a800f7b124c..cff40aa4c2516809595b78b31c3a1a10e0af0f1e 100755
--- a/indra/newview/tests/test_llxmlrpc_peer.py
+++ b/indra/newview/tests/test_llxmlrpc_peer.py
@@ -31,12 +31,11 @@
 
 import os
 import sys
-from threading import Thread
 from SimpleXMLRPCServer import SimpleXMLRPCServer
 
 mydir = os.path.dirname(__file__)       # expected to be .../indra/newview/tests/
 sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "llmessage", "tests"))
-from testrunner import run, debug
+from testrunner import freeport, run, debug
 
 class TestServer(SimpleXMLRPCServer):
     # This server_bind() override is borrowed and simplified from
@@ -76,8 +75,18 @@ def log_error(self, format, *args):
         pass
 
 if __name__ == "__main__":
-    # Make the runtime choose an available port.
-    xmlrpcd = TestServer(('127.0.0.1', 0))
+    # function to make a server with specified port
+    make_server = lambda port: TestServer(('127.0.0.1', port))
+
+    if not sys.platform.startswith("win"):
+        # Instantiate a TestServer on a port chosen by the runtime.
+        xmlrpcd = make_server(0)
+    else:
+        # "Then there's Windows"
+        # Instantiate a TestServer on the first free port in the specified
+        # port range.
+        xmlrpcd, port = freeport(xrange(8000, 8020), make_server)
+
     # Pass the selected port number to the subject test program via the
     # environment. We don't want to impose requirements on the test program's
     # command-line parsing -- and anyway, for C++ integration tests, that's