[Webkit-unassigned] [Bug 46503] webkitpy.layout_tests.port.mac_unittest.MacTest.test_http_server fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 27 16:45:50 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=46503





--- Comment #9 from Dirk Pranke <dpranke at chromium.org>  2010-09-27 16:45:50 PST ---
(In reply to comment #8)
> > Hrm. I understand the goal, but I'm not sure if that's achievable all the time in practice. For example, the particular unit test's whole point is to ensure that calling start_http_server() actually starts the http server on the port we expect it to be running on.
> 
> Instead of actually starting the server, you can just verify that you would have created the right subprocess, much like all the commit-queue patches don't actually commit to SVN.  They just verify that the right SCM.py methods are called.

I'm torn on this answer. On the one hand, yeah, I can mock out executive.runcommand() and verify that the correct command line was invoked, and that might achieve some level of correctness. On the other hand, (a) that's fragile -- it's much too much of a white-box test to make me happy -- and (b) it won't actually test that the http_server did in fact start (making this arguably a functional test instead of a unit test, but this is quibbling over definitions). 

So, for example, if Eric's getting failures because there is a stale http server lying around, or because he's running two concurrently, we'll gloss over that failure and then weird things will happen down the road when you run the layout tests.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list