Build: #44 failed

Job: Default Job failed

Stages & jobs

  1. Default Stage

Add provenance twice: Test case result

The below summarizes the result of the test "Add provenance twice" in build 44 of FLARECAST - propertyservice - Default Job. View test case history
Description
Add provenance twice
Test class
provenance_tests.ProvenanceTests
Method
test_add_provenance_twice
Duration
< 1 sec
Status
Failed (Existing Failure)

Error Log

ConnectionError: HTTPConnectionPool(host='db', port=8002): Max retries exceeded with url: /provenance (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd24d64a890>: Failed to establish a new connection: [Errno -2] Name or service not known',))
self = <tests.provenance_tests.ProvenanceTests testMethod=test_add_provenance_twice>

    def test_add_provenance_twice(self):
>       result = self.client.add_provenance(TEST_PROVENANCE)

provenance_tests.py:17: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_db_client.py:76: in add_provenance
    return self.__post_request(url, name)
/home/bamboo/.local/lib/python2.7/site-packages/flarecast/utils/property_db_client.py:193: in __post_request
    r = requests.post(url, json=payload, headers=headers)
/home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:109: in post
    return request('post', url, data=data, json=json, **kwargs)
/home/bamboo/.local/lib/python2.7/site-packages/requests/api.py:50: in request
    response = session.request(method=method, url=url, **kwargs)
/home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:468: in request
    resp = self.send(prep, **send_kwargs)
/home/bamboo/.local/lib/python2.7/site-packages/requests/sessions.py:576: in send
    r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <requests.adapters.HTTPAdapter object at 0x7fd24d64a4d0>
request = <PreparedRequest [POST]>, stream = False
timeout = <requests.packages.urllib3.util.timeout.Timeout object at 0x7fd24d64ad50>
verify = True, cert = None, proxies = OrderedDict()

    def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
        """Sends PreparedRequest object. Returns Response object.
    
            :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
            :param stream: (optional) Whether to stream the request content.
            :param timeout: (optional) How long to wait for the server to send
                data before giving up, as a float, or a :ref:`(connect timeout,
                read timeout) <timeouts>` tuple.
            :type timeout: float or tuple
            :param verify: (optional) Whether to verify SSL certificates.
            :param cert: (optional) Any user-provided SSL certificate to be trusted.
            :param proxies: (optional) The proxies dictionary to apply to the request.
            """
    
        conn = self.get_connection(request.url, proxies)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request)
    
        chunked = not (request.body is None or 'Content-Length' in request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {0}. Pass a (connect, read) "
                       "timeout tuple, or a single float to set "
                       "both timeouts to the same value".format(timeout))
                raise ValueError(err)
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
            if not chunked:
                resp = conn.urlopen(
                    method=request.method,
                    url=url,
                    body=request.body,
                    headers=request.headers,
                    redirect=False,
                    assert_same_host=False,
                    preload_content=False,
                    decode_content=False,
                    retries=self.max_retries,
                    timeout=timeout
                )
    
            # Send the request.
            else:
                if hasattr(conn, 'proxy_pool'):
                    conn = conn.proxy_pool
    
                low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)
    
                try:
                    low_conn.putrequest(request.method,
                                        url,
                                        skip_accept_encoding=True)
    
                    for header, value in request.headers.items():
                        low_conn.putheader(header, value)
    
                    low_conn.endheaders()
    
                    for i in request.body:
                        low_conn.send(hex(len(i))[2:].encode('utf-8'))
                        low_conn.send(b'\r\n')
                        low_conn.send(i)
                        low_conn.send(b'\r\n')
                    low_conn.send(b'0\r\n\r\n')
    
                    r = low_conn.getresponse()
                    resp = HTTPResponse.from_httplib(
                        r,
                        pool=conn,
                        connection=low_conn,
                        preload_content=False,
                        decode_content=False
                    )
                except:
                    # If we hit any problems here, clean up the connection.
                    # Then, reraise so that we can handle the actual exception.
                    low_conn.close()
                    raise
    
        except (ProtocolError, socket.error) as err:
            raise ConnectionError(err, request=request)
    
        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
    
            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
    
>           raise ConnectionError(e, request=request)
E           ConnectionError: HTTPConnectionPool(host='db', port=8002): Max retries exceeded with url: /provenance (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd24d64a890>: Failed to establish a new connection: [Errno -2] Name or service not known',))

/home/bamboo/.local/lib/python2.7/site-packages/requests/adapters.py:423: ConnectionError