Skip to content

Commit

Permalink
Use python_version.major+minor to avoid database conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
odeke-em committed Feb 10, 2025
1 parent a9740a7 commit bbd45fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/test_spanner_vector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import datetime
import os
import sys
import uuid
from typing import Dict

Expand All @@ -40,7 +41,10 @@
# they fix the bad delay, let's reuse the same database and never DROP
# the database nor table to allow for effective reuse.
ann_db = os.environ.get("GOOGLE_SPANNER_ANN_DB", "my-spanner-db-ann")
table_name_ANN = "our_table_ann"
uniq_py_suffix = f"-py{sys.version_info.major}{sys.version_info.minor}"
table_name_ANN = f"our_table_ann{uniq_py_suffix}"

raise Exception(table_name_ANN)


OPERATION_TIMEOUT_SECONDS = 240
Expand Down Expand Up @@ -402,7 +406,7 @@ def test_spanner_vector_search_data4(self, setup_database):


title_vector_size = 3
title_vector_index_name = "title_v_index"
title_vector_index_name = f"title_v_index{uniq_py_suffix}"
title_vector_embedding_column = TableColumn(
name="title_embedding", type="ARRAY<FLOAT64>", is_null=True
)
Expand Down

0 comments on commit bbd45fa

Please sign in to comment.