Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cache_setup.py so build doesn't fail if configured cache is empty.
Add test for read_cache_available Add test for write_cache_available(), remove delayed_server dependency. move delay handler into helper module. fix task.py do_check_artifact_cache. No longer tries to access read_cache when read_cache is None mark test_scalastyle_integration and test_checkstyle_integration tests to fail.
- Loading branch information
1 parent
34ac743
commit 38a28af
Showing
8 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# coding=utf-8 | ||
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, | ||
unicode_literals, with_statement) | ||
|
||
import threading | ||
import time | ||
|
||
from six.moves import SimpleHTTPServer, socketserver | ||
|
||
|
||
def get_delayed_handler(delay): | ||
class DelayResponseHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | ||
def do_HEAD(self): | ||
time.sleep(delay) | ||
self.send_response(200) | ||
self.end_headers() | ||
|
||
return DelayResponseHandler | ||
|
||
|
||
def setup_delayed_server(delay): | ||
server = socketserver.TCPServer(("", 0), get_delayed_handler(delay)) | ||
thread = threading.Thread(target=server.serve_forever) | ||
thread.daemon = True | ||
thread.start() | ||
return server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters