Skip to content

Commit

Permalink
Typos, cleanup, warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristian Aune committed Apr 21, 2022
1 parent 95909a2 commit ace97ca
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions vespa/test_integration_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pytest
import os
import re
import shutil
import asyncio
import json
from pandas import DataFrame
Expand Down Expand Up @@ -139,7 +138,7 @@ def deploy(self, application_package, container_image=None):
self.vespa_docker = VespaDocker(port=8089)

try:
app = self.vespa_docker.deploy(application_package=application_package)
self.vespa_docker.deploy(application_package=application_package)
except RuntimeError as e:
assert False, "Deployment error: {}".format(e)
#
Expand Down Expand Up @@ -167,12 +166,9 @@ def create_vespa_docker_from_container_name_or_id(
)
self.assertEqual(self.vespa_docker, vespa_docker_from_container)

def redeploy_with_container_stopped(self, application_package, disk_folder):
self.vespa_docker = VespaDocker(port=8089, disk_folder=disk_folder)
app = self.vespa_docker.deploy(application_package=application_package)
self.assertTrue(
any(re.match("Generation: [0-9]+", line) for line in app.deployment_message)
)
def redeploy_with_container_stopped(self, application_package):
self.vespa_docker = VespaDocker(port=8089)
self.vespa_docker.deploy(application_package=application_package)
self.vespa_docker.container.stop()
app = self.vespa_docker.deploy(application_package=application_package)
self.assertEqual(app.get_application_status().status_code, 200)
Expand Down Expand Up @@ -246,7 +242,7 @@ def execute_data_operations(
:param fields_to_send: Dict where keys are field names and values are field values. Must contain 'id' field
:param field_to_update: Dict where keys are field names and values are field values.
:param expected_fields_from_get_operation: Dict containing fields as returned by Vespa get operation.
There are cases where fields returned from Vespa are different than inputs, e.g. when dealing with Tensors.
There are cases where fields returned from Vespa are different from inputs, e.g. when dealing with Tensors.
:return:
"""
assert "id" in fields_to_send, "fields_to_send must contain 'id' field."
Expand Down Expand Up @@ -410,7 +406,7 @@ async def execute_async_data_operations(
contain 'id' field.
:param field_to_update: Dict where keys are field names and values are field values.
:param expected_fields_from_get_operation: Dict containing fields as returned by Vespa get operation.
There are cases where fields returned from Vespa are different than inputs, e.g. when dealing with Tensors.
There are cases where fields returned from Vespa are different from inputs, e.g. when dealing with Tensors.
:return:
"""
async with app.asyncio(connections=120, total_timeout=50) as async_app:
Expand Down Expand Up @@ -584,7 +580,7 @@ def batch_operations_synchronous_mode(
:param fields_to_send: List of Dicts where keys are field names and values are field values. Must
contain 'id' field.
:param expected_fields_from_get_operation: Dict containing fields as returned by Vespa get operation.
There are cases where fields returned from Vespa are different than inputs, e.g. when dealing with Tensors.
There are cases where fields returned from Vespa are different from inputs, e.g. when dealing with Tensors.
:param fields_to_update: Dict where keys are field names and values are field values.
:param query_batch: Optional list of query strings.
:param query_model: Optional QueryModel to use with query_batch.
Expand Down Expand Up @@ -692,7 +688,7 @@ def batch_operations_asynchronous_mode(
:param fields_to_send: List of Dicts where keys are field names and values are field values. Must
contain 'id' field.
:param expected_fields_from_get_operation: Dict containing fields as returned by Vespa get operation.
There are cases where fields returned from Vespa are different than inputs, e.g. when dealing with Tensors.
There are cases where fields returned from Vespa are different from inputs, e.g. when dealing with Tensors.
:param fields_to_update: Dict where keys are field names and values are field values.
:param query_batch: Optional list of query strings.
:param query_model: Optional QueryModel to use with query_batch.
Expand Down Expand Up @@ -801,7 +797,7 @@ def batch_operations_default_mode_with_one_schema(
:param fields_to_send: List of Dicts where keys are field names and values are field values. Must
contain 'id' field.
:param expected_fields_from_get_operation: Dict containing fields as returned by Vespa get operation.
There are cases where fields returned from Vespa are different than inputs, e.g. when dealing with Tensors.
There are cases where fields returned from Vespa are different from inputs, e.g. when dealing with Tensors.
:param fields_to_update: Dict where keys are field names and values are field values.
:return:
"""
Expand Down

0 comments on commit ace97ca

Please sign in to comment.