|
68 | 68 | ])
|
69 | 69 | registry.register_coder(MetadataConflictRow, RowCoder)
|
70 | 70 |
|
| 71 | +_LOGGER = logging.getLogger(__name__) |
71 | 72 | VECTOR_SIZE = 768
|
72 | 73 |
|
73 | 74 |
|
@@ -146,12 +147,12 @@ class AlloyDBVectorWriterConfigTest(unittest.TestCase):
|
146 | 147 |
|
147 | 148 | @classmethod
|
148 | 149 | def setUpClass(cls):
|
149 |
| - cls.host = os.environ.get('ALLOYDB_HOST', '10.0.0.2') |
| 150 | + cls.host = os.environ.get('ALLOYDB_HOST', '10.119.0.22') |
150 | 151 | cls.port = os.environ.get('ALLOYDB_PORT', '5432')
|
151 | 152 | cls.database = os.environ.get('ALLOYDB_DATABASE', 'postgres')
|
152 | 153 | cls.username = os.environ.get('ALLOYDB_USERNAME', 'postgres')
|
153 | 154 | if not os.environ.get('ALLOYDB_PASSWORD'):
|
154 |
| - raise ValueError("ALLOYDB_PASSWORD is not set.") |
| 155 | + raise ValueError('ALLOYDB_PASSWORD env not set') |
155 | 156 | cls.password = os.environ.get('ALLOYDB_PASSWORD')
|
156 | 157 |
|
157 | 158 | # Create unique table name suffix
|
@@ -373,7 +374,7 @@ def custom_row_to_chunk(row):
|
373 | 374 | # Extract timestamp from custom_id
|
374 | 375 | timestamp = row.custom_id.split('timestamp_')[1]
|
375 | 376 | # Extract index from timestamp
|
376 |
| - i = int(timestamp.split('T wrong')[1][:2]) |
| 377 | + i = int(timestamp.split('T')[1][:2]) |
377 | 378 |
|
378 | 379 | # Parse embedding vector
|
379 | 380 | embedding_list = [
|
@@ -488,7 +489,7 @@ def custom_row_to_chunk(row):
|
488 | 489 |
|
489 | 490 | # Verify count
|
490 | 491 | count_result = rows | "Count All" >> beam.combiners.Count.Globally()
|
491 |
| - assert_that(count_result, equal_to([num_records]), label='count_check') |
| 492 | + assert_that(count_result, equal_to([10]), label='count_check') |
492 | 493 |
|
493 | 494 | chunks = rows | "To Chunks" >> beam.Map(custom_row_to_chunk)
|
494 | 495 | assert_that(chunks, equal_to(test_chunks), label='chunks_check')
|
|
0 commit comments