'Returns ``None`` if there is a timeout while connecting to the metadata
server.'

@capture_logging(None)
def test_timeout_error(self, logger):

    result = metadata_from_service(metadata_service_endpoint=('10.0.0.0', 80), connect_timeout=1.0)
    self.assertIs(None, result)
    [message] = logger.messages
    assertContainsFields(self, message, {'message_type': 'flocker:node:agents:blockdevice:openstack:compute_instance_id:metadataservice_connect_timeout'})
