simple 16-Aug-2016 15:25:28 Build FLARECAST - propertyservice - Default Job #383 (INFRA-PROP-JOB1-383) started building on agent Default Agent simple 16-Aug-2016 15:25:28 simple 16-Aug-2016 15:25:28 Build working directory is /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1 simple 16-Aug-2016 15:25:28 Executing build FLARECAST - propertyservice - Default Job #383 (INFRA-PROP-JOB1-383) simple 16-Aug-2016 15:25:28 Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' simple 16-Aug-2016 15:25:28 Build always requires a clean checkout simple 16-Aug-2016 15:25:28 Cleaning build directory '/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1' simple 16-Aug-2016 15:25:28 Updating source code to revision: 64fd80ee3889b116475023868f6acbefc3ec4a15 simple 16-Aug-2016 15:25:28 Fetching 'refs/heads/master' from 'ssh://git@localhost:7999/fe/propertyservice.git'. simple 16-Aug-2016 15:25:28 Warning: Permanently added '[127.0.0.1]:38786' (RSA) to the list of known hosts. simple 16-Aug-2016 15:25:29 Checking out revision 64fd80ee3889b116475023868f6acbefc3ec4a15. simple 16-Aug-2016 15:25:29 Creating local git repository in '/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/.git'. simple 16-Aug-2016 15:25:29 Cloning into '/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1'... simple 16-Aug-2016 15:25:30 Already on 'master' simple 16-Aug-2016 15:25:30 Your branch is up-to-date with 'origin/master'. simple 16-Aug-2016 15:25:30 Updated source code to revision: 64fd80ee3889b116475023868f6acbefc3ec4a15 simple 16-Aug-2016 15:25:30 Finished task 'Checkout Default Repository' with result: Success simple 16-Aug-2016 15:25:30 Running pre-build action: VCS Version Collector simple 16-Aug-2016 15:25:30 Running pre-build action: Sauce OnDemand Build Configurator simple 16-Aug-2016 15:25:30 Starting task 'Build' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' command 16-Aug-2016 15:25:30 Beginning to execute external process for build 'FLARECAST - propertyservice - Default Job #383 (INFRA-PROP-JOB1-383)'\n ... running command line: \n/bin/sh ./build.sh\n ... in: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=master\nbamboo_dependency_parent_0=INFRA-BASE-339\nbamboo_dependency_parent_total=1\nbamboo_repository_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_resultsUrl=https://dev.flarecast.eu/bamboo/browse/INFRA-PROP-JOB1-383\nbamboo_planRepository_1_name=propertyservice\nbamboo_build_working_directory=/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1\nbamboo_buildKey=INFRA-PROP-JOB1\nbamboo_capability_system_builder_command_Docker_Compose=/usr/local/bin/docker-compose\nbamboo_shortPlanName=propertyservice\nbamboo_planRepository_name=propertyservice\nbamboo_buildNumber=383\nbamboo_shortJobName=Default Job\nbamboo_capability_system_builder_command_Virtual_Frambuffer_run=/usr/bin/xvfb-run\nbamboo_buildResultsUrl=https://dev.flarecast.eu/bamboo/browse/INFRA-PROP-JOB1-383\nbamboo_repository_2785292_branch_name=master\nbamboo_planRepository_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_agentId=131073\nbamboo_planName=FLARECAST - propertyservice\nbamboo_shortPlanKey=PROP\nbamboo_repository_2785292_git_username=\nbamboo_shortJobKey=JOB1\nbamboo_capability_system_jdk_JDK_1_7_0_65=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_planRepository_revision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_previous_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_buildTimeStamp=2016-08-16T15:25:13.810+02:00\nbamboo_planRepository_previousRevision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_2785292_previous_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_capability_system_builder_command_pytest=/usr/local/bin/py.test\nbamboo_buildResultKey=INFRA-PROP-JOB1-383\nbamboo_capability_system_builder_command_Docker=/usr/bin/docker\nbamboo_repository_git_branch=master\nbamboo_repository_branch_name=master\nbamboo_buildPlanName=FLARECAST - propertyservice - Default Job\nbamboo_planRepository_1_revision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_name=propertyservice\nbamboo_repository_2785292_git_branch=master\nbamboo_repository_2785292_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_planRepository_branch=master\nbamboo_agentWorkingDirectory=/var/atlassian/application-data/bamboo/xml-data/build-dir\nbamboo_capability_system_git_executable=/usr/bin/git\nbamboo_planRepository_1_previousRevision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_git_username=\nbamboo_planRepository_1_type=stash-rep\nbamboo_planRepository_branchName=master\nbamboo_capability_system_jdk_JDK=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_repository_2785292_git_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_planRepository_type=stash-rep\nbamboo_planRepository_1_username=\nbamboo_repository_2785292_name=propertyservice\nbamboo_repository_git_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_working_directory=/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1\nbamboo_planKey=INFRA-PROP\nbamboo_planRepository_1_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_planRepository_username=\nbamboo_capability_system_jdk_JDK_1_7=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_planRepository_1_branchName=master\n build 16-Aug-2016 15:25:30 Sending build context to Docker daemon 138.8 kB build 16-Aug-2016 15:25:30 build 16-Aug-2016 15:25:30 Step 1 : FROM flarecast/python-base build 16-Aug-2016 15:25:30 ---> 5277909729a6 build 16-Aug-2016 15:25:30 Step 2 : MAINTAINER i4Ds build 16-Aug-2016 15:25:30 ---> Using cache build 16-Aug-2016 15:25:30 ---> 705fc6bb44d3 build 16-Aug-2016 15:25:30 Step 3 : COPY . ./property_service build 16-Aug-2016 15:25:30 ---> 5ccb49236154 build 16-Aug-2016 15:25:30 Removing intermediate container 747ae0adfcfa build 16-Aug-2016 15:25:30 Step 4 : WORKDIR ./property_service build 16-Aug-2016 15:25:30 ---> Running in 0295167a9879 build 16-Aug-2016 15:25:30 ---> f07327c05539 build 16-Aug-2016 15:25:30 Removing intermediate container 0295167a9879 build 16-Aug-2016 15:25:30 Step 5 : LABEL eu.flarecast.type "system" eu.flarecast.name "propertyservice" build 16-Aug-2016 15:25:30 ---> Running in 4cd287ca030a build 16-Aug-2016 15:25:30 ---> 4e56910a72d8 build 16-Aug-2016 15:25:30 Removing intermediate container 4cd287ca030a build 16-Aug-2016 15:25:30 Step 6 : CMD uwsgi --http :8002 -w main -p 16 build 16-Aug-2016 15:25:30 ---> Running in 86b8ab8cbd3d build 16-Aug-2016 15:25:30 ---> 94ba3a3c9229 build 16-Aug-2016 15:25:30 Removing intermediate container 86b8ab8cbd3d build 16-Aug-2016 15:25:30 Successfully built 94ba3a3c9229 simple 16-Aug-2016 15:25:31 Finished task 'Build' with result: Success simple 16-Aug-2016 15:25:31 Starting task 'Run tests' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' command 16-Aug-2016 15:25:31 Beginning to execute external process for build 'FLARECAST - propertyservice - Default Job #383 (INFRA-PROP-JOB1-383)'\n ... running command line: \n/bin/sh /opt/atlassian/bamboo/temp/INFRA-PROP-JOB1-383-ScriptBuildTask-8080735534226775758.sh\n ... in: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests\n ... using extra environment variables: \nbamboo_planRepository_1_branch=master\nbamboo_dependency_parent_0=INFRA-BASE-339\nbamboo_dependency_parent_total=1\nbamboo_repository_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_resultsUrl=https://dev.flarecast.eu/bamboo/browse/INFRA-PROP-JOB1-383\nbamboo_planRepository_1_name=propertyservice\nbamboo_build_working_directory=/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1\nbamboo_buildKey=INFRA-PROP-JOB1\nbamboo_capability_system_builder_command_Docker_Compose=/usr/local/bin/docker-compose\nbamboo_shortPlanName=propertyservice\nbamboo_planRepository_name=propertyservice\nbamboo_buildNumber=383\nbamboo_shortJobName=Default Job\nbamboo_capability_system_builder_command_Virtual_Frambuffer_run=/usr/bin/xvfb-run\nbamboo_buildResultsUrl=https://dev.flarecast.eu/bamboo/browse/INFRA-PROP-JOB1-383\nbamboo_repository_2785292_branch_name=master\nbamboo_planRepository_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_agentId=131073\nbamboo_planName=FLARECAST - propertyservice\nbamboo_shortPlanKey=PROP\nbamboo_repository_2785292_git_username=\nbamboo_shortJobKey=JOB1\nbamboo_capability_system_jdk_JDK_1_7_0_65=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_planRepository_revision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_previous_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_buildTimeStamp=2016-08-16T15:25:13.810+02:00\nbamboo_planRepository_previousRevision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_2785292_previous_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_build_commandline_com_atlassian_bamboo_plugins_scripttask_task_builder_script_2=/bin/sh ./build.sh\nbamboo_capability_system_builder_command_pytest=/usr/local/bin/py.test\nbamboo_buildResultKey=INFRA-PROP-JOB1-383\nbamboo_capability_system_builder_command_Docker=/usr/bin/docker\nbamboo_repository_git_branch=master\nbamboo_repository_branch_name=master\nbamboo_buildPlanName=FLARECAST - propertyservice - Default Job\nbamboo_planRepository_1_revision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_name=propertyservice\nbamboo_repository_2785292_git_branch=master\nbamboo_repository_2785292_revision_number=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_planRepository_branch=master\nbamboo_agentWorkingDirectory=/var/atlassian/application-data/bamboo/xml-data/build-dir\nbamboo_capability_system_git_executable=/usr/bin/git\nbamboo_planRepository_1_previousRevision=64fd80ee3889b116475023868f6acbefc3ec4a15\nbamboo_repository_git_username=\nbamboo_planRepository_1_type=stash-rep\nbamboo_planRepository_branchName=master\nbamboo_capability_system_jdk_JDK=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_repository_2785292_git_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_planRepository_type=stash-rep\nbamboo_planRepository_1_username=\nbamboo_repository_2785292_name=propertyservice\nbamboo_repository_git_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_working_directory=/var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1\nbamboo_planKey=INFRA-PROP\nbamboo_planRepository_1_repositoryUrl=ssh://git@localhost:7999/fe/propertyservice.git\nbamboo_planRepository_username=\nbamboo_capability_system_jdk_JDK_1_7=/usr/lib/jvm/java-7-openjdk-amd64\nbamboo_planRepository_1_branchName=master\n build 16-Aug-2016 15:25:42 Traceback (most recent call last): error 16-Aug-2016 15:25:42 Traceback (most recent call last): build 16-Aug-2016 15:25:42 File "./setup_docker_env.py", line 47, in build 16-Aug-2016 15:25:42 docker_client.start(propertyservice) build 16-Aug-2016 15:25:42 File "/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py", line 21, in wrapped build 16-Aug-2016 15:25:42 return f(self, resource_id, *args, **kwargs) build 16-Aug-2016 15:25:42 File "/usr/local/lib/python2.7/dist-packages/docker/api/container.py", line 343, in start build 16-Aug-2016 15:25:42 self._raise_for_status(res) build 16-Aug-2016 15:25:42 File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 142, in _raise_for_status build 16-Aug-2016 15:25:42 raise errors.APIError(e, response, explanation=explanation) build 16-Aug-2016 15:25:42 APIError: 500 Server Error: Internal Server Error ("Cannot link to a non running container: /db AS /property/db") build 16-Aug-2016 15:25:42 error 16-Aug-2016 15:25:42 File "./setup_docker_env.py", line 55, in error 16-Aug-2016 15:25:42 raise (e) error 16-Aug-2016 15:25:42 docker.errors.APIError: 500 Server Error: Internal Server Error ("Cannot link to a non running container: /db AS /property/db") build 16-Aug-2016 15:25:42 ============================= test session starts ============================== build 16-Aug-2016 15:25:42 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:42 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:42 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:42 collected 4 items build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 provenance_tests.py FFFF build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 =================================== FAILURES =================================== build 16-Aug-2016 15:25:42 _____________________ DatasetTests.test_add_dataset_twice ______________________ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def test_add_dataset_twice(self): build 16-Aug-2016 15:25:42 > result = self.client.add_dataset(TEST_DATASET) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 provenance_tests.py:19: build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:76: in add_dataset build 16-Aug-2016 15:25:42 return self.__post_request(url, name) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:193: in __post_request build 16-Aug-2016 15:25:42 r = requests.post(url, json=payload, headers=headers) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:110: in post build 16-Aug-2016 15:25:42 return request('post', url, data=data, json=json, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:42 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:42 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:42 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 request = , stream = False build 16-Aug-2016 15:25:42 timeout = build 16-Aug-2016 15:25:42 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:42 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:42 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:42 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:42 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:42 read timeout) ` tuple. build 16-Aug-2016 15:25:42 :type timeout: float or tuple build 16-Aug-2016 15:25:42 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:42 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:42 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:42 """ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:42 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:42 self.add_headers(request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 connect, read = timeout build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:42 except ValueError as e: build 16-Aug-2016 15:25:42 # this may raise a string formatting error. build 16-Aug-2016 15:25:42 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:42 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:42 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:42 raise ValueError(err) build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 if not chunked: build 16-Aug-2016 15:25:42 resp = conn.urlopen( build 16-Aug-2016 15:25:42 method=request.method, build 16-Aug-2016 15:25:42 url=url, build 16-Aug-2016 15:25:42 body=request.body, build 16-Aug-2016 15:25:42 headers=request.headers, build 16-Aug-2016 15:25:42 redirect=False, build 16-Aug-2016 15:25:42 assert_same_host=False, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False, build 16-Aug-2016 15:25:42 retries=self.max_retries, build 16-Aug-2016 15:25:42 timeout=timeout build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Send the request. build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:42 conn = conn.proxy_pool build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:42 url, build 16-Aug-2016 15:25:42 skip_accept_encoding=True) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for header, value in request.headers.items(): build 16-Aug-2016 15:25:42 low_conn.putheader(header, value) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn.endheaders() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for i in request.body: build 16-Aug-2016 15:25:42 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(i) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Receive the response from the server build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:42 # responses build 16-Aug-2016 15:25:42 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:42 except TypeError: build 16-Aug-2016 15:25:42 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:42 r = low_conn.getresponse() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:42 r, build 16-Aug-2016 15:25:42 pool=conn, build 16-Aug-2016 15:25:42 connection=low_conn, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 except: build 16-Aug-2016 15:25:42 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:42 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:42 low_conn.close() build 16-Aug-2016 15:25:42 raise build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:42 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except MaxRetryError as e: build 16-Aug-2016 15:25:42 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:42 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:42 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:42 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:42 raise RetryError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:42 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:42 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /dataset (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:42 ___________________ DatasetTests.test_add_multiple_datasets ____________________ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def test_add_multiple_datasets(self): build 16-Aug-2016 15:25:42 > result = self.client.insert_datasets(TEST_DATASETS) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 provenance_tests.py:15: build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:66: in insert_datasets build 16-Aug-2016 15:25:42 return self.__post_request(url, dataset_list) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:193: in __post_request build 16-Aug-2016 15:25:42 r = requests.post(url, json=payload, headers=headers) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:110: in post build 16-Aug-2016 15:25:42 return request('post', url, data=data, json=json, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:42 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:42 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:42 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 request = , stream = False build 16-Aug-2016 15:25:42 timeout = build 16-Aug-2016 15:25:42 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:42 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:42 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:42 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:42 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:42 read timeout) ` tuple. build 16-Aug-2016 15:25:42 :type timeout: float or tuple build 16-Aug-2016 15:25:42 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:42 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:42 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:42 """ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:42 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:42 self.add_headers(request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 connect, read = timeout build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:42 except ValueError as e: build 16-Aug-2016 15:25:42 # this may raise a string formatting error. build 16-Aug-2016 15:25:42 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:42 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:42 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:42 raise ValueError(err) build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 if not chunked: build 16-Aug-2016 15:25:42 resp = conn.urlopen( build 16-Aug-2016 15:25:42 method=request.method, build 16-Aug-2016 15:25:42 url=url, build 16-Aug-2016 15:25:42 body=request.body, build 16-Aug-2016 15:25:42 headers=request.headers, build 16-Aug-2016 15:25:42 redirect=False, build 16-Aug-2016 15:25:42 assert_same_host=False, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False, build 16-Aug-2016 15:25:42 retries=self.max_retries, build 16-Aug-2016 15:25:42 timeout=timeout build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Send the request. build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:42 conn = conn.proxy_pool build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:42 url, build 16-Aug-2016 15:25:42 skip_accept_encoding=True) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for header, value in request.headers.items(): build 16-Aug-2016 15:25:42 low_conn.putheader(header, value) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn.endheaders() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for i in request.body: build 16-Aug-2016 15:25:42 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(i) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Receive the response from the server build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:42 # responses build 16-Aug-2016 15:25:42 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:42 except TypeError: build 16-Aug-2016 15:25:42 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:42 r = low_conn.getresponse() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:42 r, build 16-Aug-2016 15:25:42 pool=conn, build 16-Aug-2016 15:25:42 connection=low_conn, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 except: build 16-Aug-2016 15:25:42 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:42 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:42 low_conn.close() build 16-Aug-2016 15:25:42 raise build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:42 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except MaxRetryError as e: build 16-Aug-2016 15:25:42 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:42 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:42 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:42 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:42 raise RetryError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:42 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:42 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /dataset/bulk (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:42 ______________________ DatasetTests.test_add_one_dataset _______________________ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def test_add_one_dataset(self): build 16-Aug-2016 15:25:42 > result = self.client.add_dataset(TEST_DATASET) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 provenance_tests.py:11: build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:76: in add_dataset build 16-Aug-2016 15:25:42 return self.__post_request(url, name) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:193: in __post_request build 16-Aug-2016 15:25:42 r = requests.post(url, json=payload, headers=headers) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:110: in post build 16-Aug-2016 15:25:42 return request('post', url, data=data, json=json, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:42 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:42 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:42 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 request = , stream = False build 16-Aug-2016 15:25:42 timeout = build 16-Aug-2016 15:25:42 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:42 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:42 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:42 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:42 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:42 read timeout) ` tuple. build 16-Aug-2016 15:25:42 :type timeout: float or tuple build 16-Aug-2016 15:25:42 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:42 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:42 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:42 """ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:42 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:42 self.add_headers(request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 connect, read = timeout build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:42 except ValueError as e: build 16-Aug-2016 15:25:42 # this may raise a string formatting error. build 16-Aug-2016 15:25:42 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:42 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:42 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:42 raise ValueError(err) build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 if not chunked: build 16-Aug-2016 15:25:42 resp = conn.urlopen( build 16-Aug-2016 15:25:42 method=request.method, build 16-Aug-2016 15:25:42 url=url, build 16-Aug-2016 15:25:42 body=request.body, build 16-Aug-2016 15:25:42 headers=request.headers, build 16-Aug-2016 15:25:42 redirect=False, build 16-Aug-2016 15:25:42 assert_same_host=False, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False, build 16-Aug-2016 15:25:42 retries=self.max_retries, build 16-Aug-2016 15:25:42 timeout=timeout build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Send the request. build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:42 conn = conn.proxy_pool build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:42 url, build 16-Aug-2016 15:25:42 skip_accept_encoding=True) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for header, value in request.headers.items(): build 16-Aug-2016 15:25:42 low_conn.putheader(header, value) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn.endheaders() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for i in request.body: build 16-Aug-2016 15:25:42 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(i) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Receive the response from the server build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:42 # responses build 16-Aug-2016 15:25:42 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:42 except TypeError: build 16-Aug-2016 15:25:42 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:42 r = low_conn.getresponse() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:42 r, build 16-Aug-2016 15:25:42 pool=conn, build 16-Aug-2016 15:25:42 connection=low_conn, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 except: build 16-Aug-2016 15:25:42 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:42 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:42 low_conn.close() build 16-Aug-2016 15:25:42 raise build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:42 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except MaxRetryError as e: build 16-Aug-2016 15:25:42 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:42 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:42 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:42 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:42 raise RetryError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:42 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:42 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /dataset (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:42 ________________________ DatasetTests.test_get_dataset _________________________ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def test_get_dataset(self): build 16-Aug-2016 15:25:42 > result = self.client.get_datasets() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 provenance_tests.py:23: build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:168: in get_datasets build 16-Aug-2016 15:25:42 return self.__get_request(url) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:42 r = requests.get(url) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:42 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:42 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:42 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:42 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:42 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self = build 16-Aug-2016 15:25:42 request = , stream = False build 16-Aug-2016 15:25:42 timeout = build 16-Aug-2016 15:25:42 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:42 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:42 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:42 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:42 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:42 read timeout) ` tuple. build 16-Aug-2016 15:25:42 :type timeout: float or tuple build 16-Aug-2016 15:25:42 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:42 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:42 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:42 """ build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:42 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:42 self.add_headers(request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 connect, read = timeout build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:42 except ValueError as e: build 16-Aug-2016 15:25:42 # this may raise a string formatting error. build 16-Aug-2016 15:25:42 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:42 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:42 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:42 raise ValueError(err) build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 if not chunked: build 16-Aug-2016 15:25:42 resp = conn.urlopen( build 16-Aug-2016 15:25:42 method=request.method, build 16-Aug-2016 15:25:42 url=url, build 16-Aug-2016 15:25:42 body=request.body, build 16-Aug-2016 15:25:42 headers=request.headers, build 16-Aug-2016 15:25:42 redirect=False, build 16-Aug-2016 15:25:42 assert_same_host=False, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False, build 16-Aug-2016 15:25:42 retries=self.max_retries, build 16-Aug-2016 15:25:42 timeout=timeout build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Send the request. build 16-Aug-2016 15:25:42 else: build 16-Aug-2016 15:25:42 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:42 conn = conn.proxy_pool build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:42 url, build 16-Aug-2016 15:25:42 skip_accept_encoding=True) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for header, value in request.headers.items(): build 16-Aug-2016 15:25:42 low_conn.putheader(header, value) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 low_conn.endheaders() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 for i in request.body: build 16-Aug-2016 15:25:42 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(i) build 16-Aug-2016 15:25:42 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:42 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 # Receive the response from the server build 16-Aug-2016 15:25:42 try: build 16-Aug-2016 15:25:42 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:42 # responses build 16-Aug-2016 15:25:42 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:42 except TypeError: build 16-Aug-2016 15:25:42 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:42 r = low_conn.getresponse() build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:42 r, build 16-Aug-2016 15:25:42 pool=conn, build 16-Aug-2016 15:25:42 connection=low_conn, build 16-Aug-2016 15:25:42 preload_content=False, build 16-Aug-2016 15:25:42 decode_content=False build 16-Aug-2016 15:25:42 ) build 16-Aug-2016 15:25:42 except: build 16-Aug-2016 15:25:42 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:42 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:42 low_conn.close() build 16-Aug-2016 15:25:42 raise build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:42 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 except MaxRetryError as e: build 16-Aug-2016 15:25:42 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:42 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:42 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:42 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:42 raise RetryError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:42 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:42 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /dataset/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:42 build 16-Aug-2016 15:25:42 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:42 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_provenance_tests.xml build 16-Aug-2016 15:25:42 =========================== 4 failed in 0.33 seconds =========================== build 16-Aug-2016 15:25:43 ============================= test session starts ============================== build 16-Aug-2016 15:25:43 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:43 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:43 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:43 collected 2 items build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 property_group_tests.py FF build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 =================================== FAILURES =================================== build 16-Aug-2016 15:25:43 _____________ PropertyGroupTests.test_add_multiple_property_groups _____________ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self = build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 def test_add_multiple_property_groups(self): build 16-Aug-2016 15:25:43 result = self.client.insert_regions( build 16-Aug-2016 15:25:43 TEST_DATASET, build 16-Aug-2016 15:25:43 > [TEST_PGT_OBJECT, TEST_PGT_OBJECT_WITH_DATA] build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 property_group_tests.py:25: build 16-Aug-2016 15:25:43 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:51: in insert_regions build 16-Aug-2016 15:25:43 return self.__post_request(url, property_groups) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:193: in __post_request build 16-Aug-2016 15:25:43 r = requests.post(url, json=payload, headers=headers) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:110: in post build 16-Aug-2016 15:25:43 return request('post', url, data=data, json=json, **kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:43 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:43 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:43 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:43 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self = build 16-Aug-2016 15:25:43 request = , stream = False build 16-Aug-2016 15:25:43 timeout = build 16-Aug-2016 15:25:43 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:43 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:43 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:43 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:43 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:43 read timeout) ` tuple. build 16-Aug-2016 15:25:43 :type timeout: float or tuple build 16-Aug-2016 15:25:43 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:43 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:43 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:43 """ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:43 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:43 self.add_headers(request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 connect, read = timeout build 16-Aug-2016 15:25:43 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:43 except ValueError as e: build 16-Aug-2016 15:25:43 # this may raise a string formatting error. build 16-Aug-2016 15:25:43 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:43 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:43 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:43 raise ValueError(err) build 16-Aug-2016 15:25:43 else: build 16-Aug-2016 15:25:43 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 if not chunked: build 16-Aug-2016 15:25:43 resp = conn.urlopen( build 16-Aug-2016 15:25:43 method=request.method, build 16-Aug-2016 15:25:43 url=url, build 16-Aug-2016 15:25:43 body=request.body, build 16-Aug-2016 15:25:43 headers=request.headers, build 16-Aug-2016 15:25:43 redirect=False, build 16-Aug-2016 15:25:43 assert_same_host=False, build 16-Aug-2016 15:25:43 preload_content=False, build 16-Aug-2016 15:25:43 decode_content=False, build 16-Aug-2016 15:25:43 retries=self.max_retries, build 16-Aug-2016 15:25:43 timeout=timeout build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 # Send the request. build 16-Aug-2016 15:25:43 else: build 16-Aug-2016 15:25:43 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:43 conn = conn.proxy_pool build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:43 url, build 16-Aug-2016 15:25:43 skip_accept_encoding=True) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 for header, value in request.headers.items(): build 16-Aug-2016 15:25:43 low_conn.putheader(header, value) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 low_conn.endheaders() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 for i in request.body: build 16-Aug-2016 15:25:43 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:43 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:43 low_conn.send(i) build 16-Aug-2016 15:25:43 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:43 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 # Receive the response from the server build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:43 # responses build 16-Aug-2016 15:25:43 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:43 except TypeError: build 16-Aug-2016 15:25:43 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:43 r = low_conn.getresponse() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:43 r, build 16-Aug-2016 15:25:43 pool=conn, build 16-Aug-2016 15:25:43 connection=low_conn, build 16-Aug-2016 15:25:43 preload_content=False, build 16-Aug-2016 15:25:43 decode_content=False build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 except: build 16-Aug-2016 15:25:43 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:43 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:43 low_conn.close() build 16-Aug-2016 15:25:43 raise build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:43 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 except MaxRetryError as e: build 16-Aug-2016 15:25:43 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:43 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:43 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:43 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:43 raise RetryError(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:43 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:43 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /region/test_ds/bulk (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:43 ________________ PropertyGroupTests.test_add_one_property_group ________________ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self = build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 def test_add_one_property_group(self): build 16-Aug-2016 15:25:43 result = self.client.add_region( build 16-Aug-2016 15:25:43 TEST_DATASET, build 16-Aug-2016 15:25:43 time_start=TEST_PGT_TIME_START, build 16-Aug-2016 15:25:43 lat_hg=12.0, build 16-Aug-2016 15:25:43 > long_hg=42.1 build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 property_group_tests.py:18: build 16-Aug-2016 15:25:43 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:83: in add_region build 16-Aug-2016 15:25:43 return self.__post_request(url, group) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:193: in __post_request build 16-Aug-2016 15:25:43 r = requests.post(url, json=payload, headers=headers) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:110: in post build 16-Aug-2016 15:25:43 return request('post', url, data=data, json=json, **kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:43 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:43 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:43 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:43 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self = build 16-Aug-2016 15:25:43 request = , stream = False build 16-Aug-2016 15:25:43 timeout = build 16-Aug-2016 15:25:43 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:43 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:43 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:43 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:43 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:43 read timeout) ` tuple. build 16-Aug-2016 15:25:43 :type timeout: float or tuple build 16-Aug-2016 15:25:43 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:43 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:43 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:43 """ build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:43 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:43 self.add_headers(request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 connect, read = timeout build 16-Aug-2016 15:25:43 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:43 except ValueError as e: build 16-Aug-2016 15:25:43 # this may raise a string formatting error. build 16-Aug-2016 15:25:43 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:43 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:43 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:43 raise ValueError(err) build 16-Aug-2016 15:25:43 else: build 16-Aug-2016 15:25:43 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 if not chunked: build 16-Aug-2016 15:25:43 resp = conn.urlopen( build 16-Aug-2016 15:25:43 method=request.method, build 16-Aug-2016 15:25:43 url=url, build 16-Aug-2016 15:25:43 body=request.body, build 16-Aug-2016 15:25:43 headers=request.headers, build 16-Aug-2016 15:25:43 redirect=False, build 16-Aug-2016 15:25:43 assert_same_host=False, build 16-Aug-2016 15:25:43 preload_content=False, build 16-Aug-2016 15:25:43 decode_content=False, build 16-Aug-2016 15:25:43 retries=self.max_retries, build 16-Aug-2016 15:25:43 timeout=timeout build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 # Send the request. build 16-Aug-2016 15:25:43 else: build 16-Aug-2016 15:25:43 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:43 conn = conn.proxy_pool build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:43 url, build 16-Aug-2016 15:25:43 skip_accept_encoding=True) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 for header, value in request.headers.items(): build 16-Aug-2016 15:25:43 low_conn.putheader(header, value) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 low_conn.endheaders() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 for i in request.body: build 16-Aug-2016 15:25:43 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:43 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:43 low_conn.send(i) build 16-Aug-2016 15:25:43 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:43 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 # Receive the response from the server build 16-Aug-2016 15:25:43 try: build 16-Aug-2016 15:25:43 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:43 # responses build 16-Aug-2016 15:25:43 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:43 except TypeError: build 16-Aug-2016 15:25:43 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:43 r = low_conn.getresponse() build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:43 r, build 16-Aug-2016 15:25:43 pool=conn, build 16-Aug-2016 15:25:43 connection=low_conn, build 16-Aug-2016 15:25:43 preload_content=False, build 16-Aug-2016 15:25:43 decode_content=False build 16-Aug-2016 15:25:43 ) build 16-Aug-2016 15:25:43 except: build 16-Aug-2016 15:25:43 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:43 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:43 low_conn.close() build 16-Aug-2016 15:25:43 raise build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:43 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 except MaxRetryError as e: build 16-Aug-2016 15:25:43 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:43 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:43 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:43 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:43 raise RetryError(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:43 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:43 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /region/test_ds (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:43 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:43 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_property_group_tests.xml build 16-Aug-2016 15:25:43 =========================== 2 failed in 0.19 seconds =========================== build 16-Aug-2016 15:25:43 ============================= test session starts ============================== build 16-Aug-2016 15:25:43 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:43 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:43 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:43 collected 4 items build 16-Aug-2016 15:25:43 build 16-Aug-2016 15:25:44 property_tests.py FFFs build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 =================================== FAILURES =================================== build 16-Aug-2016 15:25:44 __________________ PropertyTests.test_add_multiple_properties __________________ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def setUp(self): build 16-Aug-2016 15:25:44 super(PropertyTests, self).setUp() build 16-Aug-2016 15:25:44 > data = self.client.get_properties(TEST_DATASET) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 property_tests.py:14: build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:44 return self.__get_request(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:44 r = requests.get(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:44 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:44 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:44 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:44 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 request = , stream = False build 16-Aug-2016 15:25:44 timeout = build 16-Aug-2016 15:25:44 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:44 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:44 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:44 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:44 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:44 read timeout) ` tuple. build 16-Aug-2016 15:25:44 :type timeout: float or tuple build 16-Aug-2016 15:25:44 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:44 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:44 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:44 """ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:44 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:44 self.add_headers(request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 connect, read = timeout build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:44 except ValueError as e: build 16-Aug-2016 15:25:44 # this may raise a string formatting error. build 16-Aug-2016 15:25:44 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:44 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:44 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:44 raise ValueError(err) build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 if not chunked: build 16-Aug-2016 15:25:44 resp = conn.urlopen( build 16-Aug-2016 15:25:44 method=request.method, build 16-Aug-2016 15:25:44 url=url, build 16-Aug-2016 15:25:44 body=request.body, build 16-Aug-2016 15:25:44 headers=request.headers, build 16-Aug-2016 15:25:44 redirect=False, build 16-Aug-2016 15:25:44 assert_same_host=False, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False, build 16-Aug-2016 15:25:44 retries=self.max_retries, build 16-Aug-2016 15:25:44 timeout=timeout build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Send the request. build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:44 conn = conn.proxy_pool build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:44 url, build 16-Aug-2016 15:25:44 skip_accept_encoding=True) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for header, value in request.headers.items(): build 16-Aug-2016 15:25:44 low_conn.putheader(header, value) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn.endheaders() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for i in request.body: build 16-Aug-2016 15:25:44 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(i) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Receive the response from the server build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:44 # responses build 16-Aug-2016 15:25:44 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:44 except TypeError: build 16-Aug-2016 15:25:44 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:44 r = low_conn.getresponse() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:44 r, build 16-Aug-2016 15:25:44 pool=conn, build 16-Aug-2016 15:25:44 connection=low_conn, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 except: build 16-Aug-2016 15:25:44 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:44 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:44 low_conn.close() build 16-Aug-2016 15:25:44 raise build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:44 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except MaxRetryError as e: build 16-Aug-2016 15:25:44 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:44 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:44 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:44 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:44 raise RetryError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:44 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:44 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:44 ________ PropertyTests.test_add_multiple_properties_from_other_dataset _________ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def setUp(self): build 16-Aug-2016 15:25:44 super(PropertyTests, self).setUp() build 16-Aug-2016 15:25:44 > data = self.client.get_properties(TEST_DATASET) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 property_tests.py:14: build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:44 return self.__get_request(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:44 r = requests.get(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:44 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:44 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:44 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:44 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 request = , stream = False build 16-Aug-2016 15:25:44 timeout = build 16-Aug-2016 15:25:44 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:44 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:44 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:44 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:44 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:44 read timeout) ` tuple. build 16-Aug-2016 15:25:44 :type timeout: float or tuple build 16-Aug-2016 15:25:44 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:44 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:44 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:44 """ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:44 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:44 self.add_headers(request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 connect, read = timeout build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:44 except ValueError as e: build 16-Aug-2016 15:25:44 # this may raise a string formatting error. build 16-Aug-2016 15:25:44 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:44 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:44 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:44 raise ValueError(err) build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 if not chunked: build 16-Aug-2016 15:25:44 resp = conn.urlopen( build 16-Aug-2016 15:25:44 method=request.method, build 16-Aug-2016 15:25:44 url=url, build 16-Aug-2016 15:25:44 body=request.body, build 16-Aug-2016 15:25:44 headers=request.headers, build 16-Aug-2016 15:25:44 redirect=False, build 16-Aug-2016 15:25:44 assert_same_host=False, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False, build 16-Aug-2016 15:25:44 retries=self.max_retries, build 16-Aug-2016 15:25:44 timeout=timeout build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Send the request. build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:44 conn = conn.proxy_pool build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:44 url, build 16-Aug-2016 15:25:44 skip_accept_encoding=True) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for header, value in request.headers.items(): build 16-Aug-2016 15:25:44 low_conn.putheader(header, value) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn.endheaders() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for i in request.body: build 16-Aug-2016 15:25:44 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(i) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Receive the response from the server build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:44 # responses build 16-Aug-2016 15:25:44 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:44 except TypeError: build 16-Aug-2016 15:25:44 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:44 r = low_conn.getresponse() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:44 r, build 16-Aug-2016 15:25:44 pool=conn, build 16-Aug-2016 15:25:44 connection=low_conn, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 except: build 16-Aug-2016 15:25:44 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:44 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:44 low_conn.close() build 16-Aug-2016 15:25:44 raise build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:44 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except MaxRetryError as e: build 16-Aug-2016 15:25:44 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:44 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:44 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:44 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:44 raise RetryError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:44 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:44 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:44 _____________________ PropertyTests.test_add_one_property ______________________ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def setUp(self): build 16-Aug-2016 15:25:44 super(PropertyTests, self).setUp() build 16-Aug-2016 15:25:44 > data = self.client.get_properties(TEST_DATASET) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 property_tests.py:14: build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:44 return self.__get_request(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:44 r = requests.get(url) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:44 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:44 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:44 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:44 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:44 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self = build 16-Aug-2016 15:25:44 request = , stream = False build 16-Aug-2016 15:25:44 timeout = build 16-Aug-2016 15:25:44 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:44 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:44 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:44 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:44 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:44 read timeout) ` tuple. build 16-Aug-2016 15:25:44 :type timeout: float or tuple build 16-Aug-2016 15:25:44 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:44 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:44 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:44 """ build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:44 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:44 self.add_headers(request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 connect, read = timeout build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:44 except ValueError as e: build 16-Aug-2016 15:25:44 # this may raise a string formatting error. build 16-Aug-2016 15:25:44 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:44 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:44 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:44 raise ValueError(err) build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 if not chunked: build 16-Aug-2016 15:25:44 resp = conn.urlopen( build 16-Aug-2016 15:25:44 method=request.method, build 16-Aug-2016 15:25:44 url=url, build 16-Aug-2016 15:25:44 body=request.body, build 16-Aug-2016 15:25:44 headers=request.headers, build 16-Aug-2016 15:25:44 redirect=False, build 16-Aug-2016 15:25:44 assert_same_host=False, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False, build 16-Aug-2016 15:25:44 retries=self.max_retries, build 16-Aug-2016 15:25:44 timeout=timeout build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Send the request. build 16-Aug-2016 15:25:44 else: build 16-Aug-2016 15:25:44 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:44 conn = conn.proxy_pool build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:44 url, build 16-Aug-2016 15:25:44 skip_accept_encoding=True) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for header, value in request.headers.items(): build 16-Aug-2016 15:25:44 low_conn.putheader(header, value) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 low_conn.endheaders() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 for i in request.body: build 16-Aug-2016 15:25:44 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(i) build 16-Aug-2016 15:25:44 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:44 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 # Receive the response from the server build 16-Aug-2016 15:25:44 try: build 16-Aug-2016 15:25:44 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:44 # responses build 16-Aug-2016 15:25:44 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:44 except TypeError: build 16-Aug-2016 15:25:44 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:44 r = low_conn.getresponse() build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:44 r, build 16-Aug-2016 15:25:44 pool=conn, build 16-Aug-2016 15:25:44 connection=low_conn, build 16-Aug-2016 15:25:44 preload_content=False, build 16-Aug-2016 15:25:44 decode_content=False build 16-Aug-2016 15:25:44 ) build 16-Aug-2016 15:25:44 except: build 16-Aug-2016 15:25:44 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:44 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:44 low_conn.close() build 16-Aug-2016 15:25:44 raise build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:44 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 except MaxRetryError as e: build 16-Aug-2016 15:25:44 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:44 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:44 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:44 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:44 raise RetryError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:44 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:44 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:44 build 16-Aug-2016 15:25:44 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:44 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_property_tests.xml build 16-Aug-2016 15:25:44 ===================== 3 failed, 1 skipped in 0.28 seconds ====================== build 16-Aug-2016 15:25:45 ============================= test session starts ============================== build 16-Aug-2016 15:25:45 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:45 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:45 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:45 collected 0 items build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_property_type_tests.xml build 16-Aug-2016 15:25:45 =============================== in 0.07 seconds =============================== build 16-Aug-2016 15:25:45 ============================= test session starts ============================== build 16-Aug-2016 15:25:45 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:45 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:45 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:45 collected 2 items build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 link_tests.py Fs build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 =================================== FAILURES =================================== build 16-Aug-2016 15:25:45 ___________________________ LinkTests.test_add_link ____________________________ build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 self = build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 def setUp(self): build 16-Aug-2016 15:25:45 super(LinkTests, self).setUp() build 16-Aug-2016 15:25:45 > data = self.client.get_properties(TEST_DATASET) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 link_tests.py:13: build 16-Aug-2016 15:25:45 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:45 return self.__get_request(url) build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:45 r = requests.get(url) build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:45 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:45 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:45 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:45 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:45 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 self = build 16-Aug-2016 15:25:45 request = , stream = False build 16-Aug-2016 15:25:45 timeout = build 16-Aug-2016 15:25:45 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:45 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:45 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:45 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:45 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:45 read timeout) ` tuple. build 16-Aug-2016 15:25:45 :type timeout: float or tuple build 16-Aug-2016 15:25:45 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:45 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:45 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:45 """ build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:45 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:45 self.add_headers(request) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:45 try: build 16-Aug-2016 15:25:45 connect, read = timeout build 16-Aug-2016 15:25:45 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:45 except ValueError as e: build 16-Aug-2016 15:25:45 # this may raise a string formatting error. build 16-Aug-2016 15:25:45 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:45 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:45 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:45 raise ValueError(err) build 16-Aug-2016 15:25:45 else: build 16-Aug-2016 15:25:45 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 try: build 16-Aug-2016 15:25:45 if not chunked: build 16-Aug-2016 15:25:45 resp = conn.urlopen( build 16-Aug-2016 15:25:45 method=request.method, build 16-Aug-2016 15:25:45 url=url, build 16-Aug-2016 15:25:45 body=request.body, build 16-Aug-2016 15:25:45 headers=request.headers, build 16-Aug-2016 15:25:45 redirect=False, build 16-Aug-2016 15:25:45 assert_same_host=False, build 16-Aug-2016 15:25:45 preload_content=False, build 16-Aug-2016 15:25:45 decode_content=False, build 16-Aug-2016 15:25:45 retries=self.max_retries, build 16-Aug-2016 15:25:45 timeout=timeout build 16-Aug-2016 15:25:45 ) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 # Send the request. build 16-Aug-2016 15:25:45 else: build 16-Aug-2016 15:25:45 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:45 conn = conn.proxy_pool build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 try: build 16-Aug-2016 15:25:45 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:45 url, build 16-Aug-2016 15:25:45 skip_accept_encoding=True) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 for header, value in request.headers.items(): build 16-Aug-2016 15:25:45 low_conn.putheader(header, value) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 low_conn.endheaders() build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 for i in request.body: build 16-Aug-2016 15:25:45 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:45 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:45 low_conn.send(i) build 16-Aug-2016 15:25:45 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:45 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 # Receive the response from the server build 16-Aug-2016 15:25:45 try: build 16-Aug-2016 15:25:45 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:45 # responses build 16-Aug-2016 15:25:45 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:45 except TypeError: build 16-Aug-2016 15:25:45 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:45 r = low_conn.getresponse() build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:45 r, build 16-Aug-2016 15:25:45 pool=conn, build 16-Aug-2016 15:25:45 connection=low_conn, build 16-Aug-2016 15:25:45 preload_content=False, build 16-Aug-2016 15:25:45 decode_content=False build 16-Aug-2016 15:25:45 ) build 16-Aug-2016 15:25:45 except: build 16-Aug-2016 15:25:45 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:45 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:45 low_conn.close() build 16-Aug-2016 15:25:45 raise build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:45 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 except MaxRetryError as e: build 16-Aug-2016 15:25:45 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:45 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:45 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:45 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:45 raise RetryError(e, request=request) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:45 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:45 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:45 build 16-Aug-2016 15:25:45 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:45 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_link_tests.xml build 16-Aug-2016 15:25:45 ===================== 1 failed, 1 skipped in 0.15 seconds ====================== build 16-Aug-2016 15:25:46 ============================= test session starts ============================== build 16-Aug-2016 15:25:46 platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 build 16-Aug-2016 15:25:46 rootdir: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/tests, inifile: build 16-Aug-2016 15:25:46 plugins: pep8-1.0.6 build 16-Aug-2016 15:25:46 collected 3 items build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 query_tests.py FFF build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 =================================== FAILURES =================================== build 16-Aug-2016 15:25:46 ___________________ QueryTests.test_get_all_property_groups ____________________ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def test_get_all_property_groups(self): build 16-Aug-2016 15:25:46 > groups = self.client.get_properties(TEST_DATASET) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 query_tests.py:17: build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:46 return self.__get_request(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:46 r = requests.get(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:46 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:46 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:46 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:46 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 request = , stream = False build 16-Aug-2016 15:25:46 timeout = build 16-Aug-2016 15:25:46 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:46 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:46 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:46 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:46 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:46 read timeout) ` tuple. build 16-Aug-2016 15:25:46 :type timeout: float or tuple build 16-Aug-2016 15:25:46 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:46 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:46 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:46 """ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:46 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:46 self.add_headers(request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 connect, read = timeout build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:46 except ValueError as e: build 16-Aug-2016 15:25:46 # this may raise a string formatting error. build 16-Aug-2016 15:25:46 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:46 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:46 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:46 raise ValueError(err) build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 if not chunked: build 16-Aug-2016 15:25:46 resp = conn.urlopen( build 16-Aug-2016 15:25:46 method=request.method, build 16-Aug-2016 15:25:46 url=url, build 16-Aug-2016 15:25:46 body=request.body, build 16-Aug-2016 15:25:46 headers=request.headers, build 16-Aug-2016 15:25:46 redirect=False, build 16-Aug-2016 15:25:46 assert_same_host=False, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False, build 16-Aug-2016 15:25:46 retries=self.max_retries, build 16-Aug-2016 15:25:46 timeout=timeout build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Send the request. build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:46 conn = conn.proxy_pool build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:46 url, build 16-Aug-2016 15:25:46 skip_accept_encoding=True) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for header, value in request.headers.items(): build 16-Aug-2016 15:25:46 low_conn.putheader(header, value) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn.endheaders() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for i in request.body: build 16-Aug-2016 15:25:46 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(i) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Receive the response from the server build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:46 # responses build 16-Aug-2016 15:25:46 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:46 except TypeError: build 16-Aug-2016 15:25:46 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:46 r = low_conn.getresponse() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:46 r, build 16-Aug-2016 15:25:46 pool=conn, build 16-Aug-2016 15:25:46 connection=low_conn, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 except: build 16-Aug-2016 15:25:46 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:46 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:46 low_conn.close() build 16-Aug-2016 15:25:46 raise build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:46 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except MaxRetryError as e: build 16-Aug-2016 15:25:46 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:46 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:46 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:46 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:46 raise RetryError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:46 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:46 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:46 _______________ QueryTests.test_get_all_property_groups_with_eq ________________ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def test_get_all_property_groups_with_eq(self): build 16-Aug-2016 15:25:46 groups = self.client.get_properties(TEST_DATASET, build 16-Aug-2016 15:25:46 > 'test1=eq(500)') build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 query_tests.py:27: build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:46 return self.__get_request(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:46 r = requests.get(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:46 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:46 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:46 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:46 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 request = , stream = False build 16-Aug-2016 15:25:46 timeout = build 16-Aug-2016 15:25:46 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:46 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:46 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:46 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:46 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:46 read timeout) ` tuple. build 16-Aug-2016 15:25:46 :type timeout: float or tuple build 16-Aug-2016 15:25:46 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:46 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:46 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:46 """ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:46 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:46 self.add_headers(request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 connect, read = timeout build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:46 except ValueError as e: build 16-Aug-2016 15:25:46 # this may raise a string formatting error. build 16-Aug-2016 15:25:46 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:46 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:46 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:46 raise ValueError(err) build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 if not chunked: build 16-Aug-2016 15:25:46 resp = conn.urlopen( build 16-Aug-2016 15:25:46 method=request.method, build 16-Aug-2016 15:25:46 url=url, build 16-Aug-2016 15:25:46 body=request.body, build 16-Aug-2016 15:25:46 headers=request.headers, build 16-Aug-2016 15:25:46 redirect=False, build 16-Aug-2016 15:25:46 assert_same_host=False, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False, build 16-Aug-2016 15:25:46 retries=self.max_retries, build 16-Aug-2016 15:25:46 timeout=timeout build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Send the request. build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:46 conn = conn.proxy_pool build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:46 url, build 16-Aug-2016 15:25:46 skip_accept_encoding=True) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for header, value in request.headers.items(): build 16-Aug-2016 15:25:46 low_conn.putheader(header, value) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn.endheaders() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for i in request.body: build 16-Aug-2016 15:25:46 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(i) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Receive the response from the server build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:46 # responses build 16-Aug-2016 15:25:46 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:46 except TypeError: build 16-Aug-2016 15:25:46 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:46 r = low_conn.getresponse() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:46 r, build 16-Aug-2016 15:25:46 pool=conn, build 16-Aug-2016 15:25:46 connection=low_conn, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 except: build 16-Aug-2016 15:25:46 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:46 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:46 low_conn.close() build 16-Aug-2016 15:25:46 raise build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:46 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except MaxRetryError as e: build 16-Aug-2016 15:25:46 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:46 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:46 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:46 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:46 raise RetryError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:46 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:46 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list?test1=eq(500) (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:46 ______________ QueryTests.test_get_all_property_groups_with_name _______________ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def test_get_all_property_groups_with_name(self): build 16-Aug-2016 15:25:46 groups = self.client.get_properties(TEST_DATASET, build 16-Aug-2016 15:25:46 > 'name=exists()') build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 query_tests.py:22: build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:113: in get_properties build 16-Aug-2016 15:25:46 return self.__get_request(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_service_client.py:211: in __get_request build 16-Aug-2016 15:25:46 r = requests.get(url) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:70: in get build 16-Aug-2016 15:25:46 return request('get', url, params=params, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:56: in request build 16-Aug-2016 15:25:46 return session.request(method=method, url=url, **kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:471: in request build 16-Aug-2016 15:25:46 resp = self.send(prep, **send_kwargs) build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:581: in send build 16-Aug-2016 15:25:46 r = adapter.send(request, **kwargs) build 16-Aug-2016 15:25:46 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self = build 16-Aug-2016 15:25:46 request = , stream = False build 16-Aug-2016 15:25:46 timeout = build 16-Aug-2016 15:25:46 verify = True, cert = None, proxies = OrderedDict() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): build 16-Aug-2016 15:25:46 """Sends PreparedRequest object. Returns Response object. build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 :param request: The :class:`PreparedRequest ` being sent. build 16-Aug-2016 15:25:46 :param stream: (optional) Whether to stream the request content. build 16-Aug-2016 15:25:46 :param timeout: (optional) How long to wait for the server to send build 16-Aug-2016 15:25:46 data before giving up, as a float, or a :ref:`(connect timeout, build 16-Aug-2016 15:25:46 read timeout) ` tuple. build 16-Aug-2016 15:25:46 :type timeout: float or tuple build 16-Aug-2016 15:25:46 :param verify: (optional) Whether to verify SSL certificates. build 16-Aug-2016 15:25:46 :param cert: (optional) Any user-provided SSL certificate to be trusted. build 16-Aug-2016 15:25:46 :param proxies: (optional) The proxies dictionary to apply to the request. build 16-Aug-2016 15:25:46 """ build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 conn = self.get_connection(request.url, proxies) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 self.cert_verify(conn, request.url, verify, cert) build 16-Aug-2016 15:25:46 url = self.request_url(request, proxies) build 16-Aug-2016 15:25:46 self.add_headers(request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 chunked = not (request.body is None or 'Content-Length' in request.headers) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(timeout, tuple): build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 connect, read = timeout build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=connect, read=read) build 16-Aug-2016 15:25:46 except ValueError as e: build 16-Aug-2016 15:25:46 # this may raise a string formatting error. build 16-Aug-2016 15:25:46 err = ("Invalid timeout {0}. Pass a (connect, read) " build 16-Aug-2016 15:25:46 "timeout tuple, or a single float to set " build 16-Aug-2016 15:25:46 "both timeouts to the same value".format(timeout)) build 16-Aug-2016 15:25:46 raise ValueError(err) build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 timeout = TimeoutSauce(connect=timeout, read=timeout) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 if not chunked: build 16-Aug-2016 15:25:46 resp = conn.urlopen( build 16-Aug-2016 15:25:46 method=request.method, build 16-Aug-2016 15:25:46 url=url, build 16-Aug-2016 15:25:46 body=request.body, build 16-Aug-2016 15:25:46 headers=request.headers, build 16-Aug-2016 15:25:46 redirect=False, build 16-Aug-2016 15:25:46 assert_same_host=False, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False, build 16-Aug-2016 15:25:46 retries=self.max_retries, build 16-Aug-2016 15:25:46 timeout=timeout build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Send the request. build 16-Aug-2016 15:25:46 else: build 16-Aug-2016 15:25:46 if hasattr(conn, 'proxy_pool'): build 16-Aug-2016 15:25:46 conn = conn.proxy_pool build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 low_conn.putrequest(request.method, build 16-Aug-2016 15:25:46 url, build 16-Aug-2016 15:25:46 skip_accept_encoding=True) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for header, value in request.headers.items(): build 16-Aug-2016 15:25:46 low_conn.putheader(header, value) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 low_conn.endheaders() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 for i in request.body: build 16-Aug-2016 15:25:46 low_conn.send(hex(len(i))[2:].encode('utf-8')) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(i) build 16-Aug-2016 15:25:46 low_conn.send(b'\r\n') build 16-Aug-2016 15:25:46 low_conn.send(b'0\r\n\r\n') build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 # Receive the response from the server build 16-Aug-2016 15:25:46 try: build 16-Aug-2016 15:25:46 # For Python 2.7+ versions, use buffering of HTTP build 16-Aug-2016 15:25:46 # responses build 16-Aug-2016 15:25:46 r = low_conn.getresponse(buffering=True) build 16-Aug-2016 15:25:46 except TypeError: build 16-Aug-2016 15:25:46 # For compatibility with Python 2.6 versions and back build 16-Aug-2016 15:25:46 r = low_conn.getresponse() build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 resp = HTTPResponse.from_httplib( build 16-Aug-2016 15:25:46 r, build 16-Aug-2016 15:25:46 pool=conn, build 16-Aug-2016 15:25:46 connection=low_conn, build 16-Aug-2016 15:25:46 preload_content=False, build 16-Aug-2016 15:25:46 decode_content=False build 16-Aug-2016 15:25:46 ) build 16-Aug-2016 15:25:46 except: build 16-Aug-2016 15:25:46 # If we hit any problems here, clean up the connection. build 16-Aug-2016 15:25:46 # Then, reraise so that we can handle the actual exception. build 16-Aug-2016 15:25:46 low_conn.close() build 16-Aug-2016 15:25:46 raise build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except (ProtocolError, socket.error) as err: build 16-Aug-2016 15:25:46 raise ConnectionError(err, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 except MaxRetryError as e: build 16-Aug-2016 15:25:46 if isinstance(e.reason, ConnectTimeoutError): build 16-Aug-2016 15:25:46 # TODO: Remove this in 3.0.0: see #2811 build 16-Aug-2016 15:25:46 if not isinstance(e.reason, NewConnectionError): build 16-Aug-2016 15:25:46 raise ConnectTimeout(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, ResponseError): build 16-Aug-2016 15:25:46 raise RetryError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 if isinstance(e.reason, _ProxyError): build 16-Aug-2016 15:25:46 raise ProxyError(e, request=request) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 > raise ConnectionError(e, request=request) build 16-Aug-2016 15:25:46 E ConnectionError: HTTPConnectionPool(host='localhost', port=8002): Max retries exceeded with url: /property/test_ds/list?name=exists() (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) build 16-Aug-2016 15:25:46 build 16-Aug-2016 15:25:46 /home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:481: ConnectionError build 16-Aug-2016 15:25:46 generated xml file: /var/atlassian/application-data/bamboo/xml-data/build-dir/INFRA-PROP-JOB1/results_query_tests.xml build 16-Aug-2016 15:25:46 =========================== 3 failed in 0.26 seconds =========================== simple 16-Aug-2016 15:25:46 Failing task since return code of [/bin/sh /opt/atlassian/bamboo/temp/INFRA-PROP-JOB1-383-ScriptBuildTask-8080735534226775758.sh] was 1 while expected 0 simple 16-Aug-2016 15:25:46 Finished task 'Run tests' with result: Failed simple 16-Aug-2016 15:25:46 Running post build plugin 'NCover Results Collector' simple 16-Aug-2016 15:25:46 Running post build plugin 'Artifact Copier' simple 16-Aug-2016 15:25:46 Running post build plugin 'Sauce OnDemand Post Runner' simple 16-Aug-2016 15:25:46 Running post build plugin 'npm Cache Cleanup' simple 16-Aug-2016 15:25:46 Running post build plugin 'Clover Results Collector' simple 16-Aug-2016 15:25:46 Running post build plugin 'Docker Container Cleanup' simple 16-Aug-2016 15:25:46 Finalising the build... simple 16-Aug-2016 15:25:46 Stopping timer. simple 16-Aug-2016 15:25:46 Build INFRA-PROP-JOB1-383 completed. simple 16-Aug-2016 15:25:46 Running on server: post build plugin 'NCover Results Collector' simple 16-Aug-2016 15:25:46 Running on server: post build plugin 'Build Hanging Detection Configuration' simple 16-Aug-2016 15:25:46 Running on server: post build plugin 'Clover Delta Calculator' simple 16-Aug-2016 15:25:46 Running on server: post build plugin 'Maven Dependencies Postprocessor' simple 16-Aug-2016 15:25:46 All post build plugins have finished simple 16-Aug-2016 15:25:46 Generating build results summary... simple 16-Aug-2016 15:25:46 Saving build results to disk... simple 16-Aug-2016 15:25:46 Logging substituted variables... simple 16-Aug-2016 15:25:46 Indexing build results... simple 16-Aug-2016 15:25:46 Finished building INFRA-PROP-JOB1-383.