Skip to content

Commit

Permalink
comment, not skip
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasht86 committed Nov 22, 2024
1 parent 084f478 commit 48c8bd4
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions tests/integration/test_integration_vespa_cloud_vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
ContainerCluster,
Nodes,
DeploymentConfiguration,
EmptyDeploymentConfiguration,
Validation,
ValidationID,
)
Expand Down Expand Up @@ -298,32 +297,33 @@ def test_application_status(self):
def test_vector_indexing_and_query(self):
super().test_vector_indexing_and_query()

@unittest.skip("Do not run when not waiting for deployment.")
def tearDown(self) -> None:
self.app.delete_all_docs(
content_cluster_name="vector_content",
schema="vector",
namespace="benchmark",
)
time.sleep(5)
with self.app.syncio() as sync_session:
response: VespaResponse = sync_session.query(
{"yql": "select id from sources * where true", "hits": 10}
)
self.assertEqual(response.get_status_code(), 200)
self.assertEqual(len(response.hits), 0)
print(response.get_json())
# DO NOT skip tearDown-method, as test will not exit.
# @unittest.skip("Do not run when not waiting for deployment.")
# def tearDown(self) -> None:
# self.app.delete_all_docs(
# content_cluster_name="vector_content",
# schema="vector",
# namespace="benchmark",
# )
# time.sleep(5)
# with self.app.syncio() as sync_session:
# response: VespaResponse = sync_session.query(
# {"yql": "select id from sources * where true", "hits": 10}
# )
# self.assertEqual(response.get_status_code(), 200)
# self.assertEqual(len(response.hits), 0)
# print(response.get_json())

# Deployment is deleted by deploying with an empty deployment.xml file.
self.app_package.deployment_config = EmptyDeploymentConfiguration()
# # Deployment is deleted by deploying with an empty deployment.xml file.
# self.app_package.deployment_config = EmptyDeploymentConfiguration()

# Vespa won't push the deleted deployment.xml file unless we add a validation override
tomorrow = datetime.now() + timedelta(days=1)
formatted_date = tomorrow.strftime("%Y-%m-%d")
self.app_package.validations = [
Validation(ValidationID("deployment-removal"), formatted_date)
]
self.app_package.to_files(self.application_root)
# This will delete the deployment
self.vespa_cloud._start_prod_deployment(self.application_root)
shutil.rmtree(self.application_root, ignore_errors=True)
# # Vespa won't push the deleted deployment.xml file unless we add a validation override
# tomorrow = datetime.now() + timedelta(days=1)
# formatted_date = tomorrow.strftime("%Y-%m-%d")
# self.app_package.validations = [
# Validation(ValidationID("deployment-removal"), formatted_date)
# ]
# self.app_package.to_files(self.application_root)
# # This will delete the deployment
# self.vespa_cloud._start_prod_deployment(self.application_root)
# shutil.rmtree(self.application_root, ignore_errors=True)

0 comments on commit 48c8bd4

Please sign in to comment.