File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
quixstreams/models/topics
tests/test_quixstreams/test_models/test_topics Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -446,15 +446,17 @@ def validate_all_topics(self, timeout: Optional[float] = None):
446
446
447
447
if changelog_cfg .num_partitions != source_cfg .num_partitions :
448
448
raise TopicConfigurationMismatch (
449
- f'Invalid partition count for the topic "{ source_name } ": '
449
+ f'changelog topic "{ changelog .name } " partition count '
450
+ f'does not match its source topic "{ source_name } ": '
450
451
f"expected { source_cfg .num_partitions } , "
451
- f" got { changelog_cfg .num_partitions } "
452
+ f' got { changelog_cfg .num_partitions } "'
452
453
)
453
454
if changelog_cfg .replication_factor != source_cfg .replication_factor :
454
455
raise TopicConfigurationMismatch (
455
- f'Invalid replication factor for the topic "{ source_name } ": '
456
+ f'changelog topic "{ changelog .name } " replication factor '
457
+ f'does not match its source topic "{ source_name } ": '
456
458
f"expected { source_cfg .replication_factor } , "
457
- f" got { changelog_cfg .num_partitions } "
459
+ f' got { changelog_cfg .replication_factor } "'
458
460
)
459
461
460
462
logger .info (f"Kafka topics validation complete" )
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ def test_validate_all_topics_changelog_partition_count_mismatch(
249
249
),
250
250
}
251
251
252
- with pytest .raises (TopicConfigurationMismatch , match = "Invalid partition count" ):
252
+ with pytest .raises (TopicConfigurationMismatch , match = "partition count" ):
253
253
topic_manager .validate_all_topics ()
254
254
255
255
def test_validate_all_topics_changelog_replication_factor_mismatch (
@@ -281,9 +281,7 @@ def test_validate_all_topics_changelog_replication_factor_mismatch(
281
281
),
282
282
}
283
283
284
- with pytest .raises (
285
- TopicConfigurationMismatch , match = "Invalid replication factor"
286
- ):
284
+ with pytest .raises (TopicConfigurationMismatch , match = "replication factor" ):
287
285
topic_manager .validate_all_topics ()
288
286
289
287
def test_topic_name_len_exceeded (self , topic_manager_factory ):
You can’t perform that action at this time.
0 commit comments