Commit 7db5c2c
Refactor: consolidate split test files into one file per source class (#205)
* refactor: consolidate VeniceDeployerValidationTest into VeniceDeployerTest
Merged all 29 tests from VeniceDeployerValidationTest.java into VeniceDeployerTest.java,
removing the now-redundant second file. The merged class is package-private, carries the
@SuppressFBWarnings annotation, and is organized by section using the existing comment
conventions. No tests were dropped; no duplicate test names existed between the two files.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* refactor: consolidate MySqlDeployerValidationTest into MySqlDeployerTest
Merged all tests from MySqlDeployerValidationTest (1030 lines) into
MySqlDeployerTest, removing true duplicates (same-assertion null-database
and restore no-op tests) and consolidating shared helper methods
(stubConnection, stubConnectionWithStatement, stubDefaultRowType).
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* refactor: consolidate split test files into one file per source class
Enforces the convention of one test file per production class. Eight
source files are deleted and their tests folded into the canonical test
for the class under test.
Consolidations
--------------
* AvroConverterTypeMappingTest → AvroConverterTest
Parameterized primitive type-mapping tests (Rel→Avro and Avro→Rel)
merged in. Adds ParameterizedTest / MethodSource / RelProtoDataType
imports to AvroConverterTest.
* K8sViewTableRowTest → K8sViewTableTest
Inner-class Row method tests (viewPath, schemaPath, viewName,
toString) merged in. No new imports required.
* SubscriptionReconcilerFetchAttributesTest → SubscriptionReconcilerTest
All reflection removed. The three tests that verified fetchAttributes()
swallows malformed YAML are rewritten to call reconcile() with the
problematic YAML placed in status.jobResources, exercising the same
error-handling paths through the public API. Adds a
buildPhase3Subscription() helper to avoid repetition.
* ScriptImplementorInnerClassesTest → ScriptImplementorTest (util)
39 inner-class tests (Catalog, Database, Connector, CompoundIdentifier,
Identifier, Seal, View, Statement, Query, Insert, DropFields, nullable
column DDL) merged in. testInsertWithSuffix renamed to
testInsertWithSuffixNullTargetFields to avoid collision with the
existing test that covers the non-null targetFields path.
* catalog/ScriptImplementorTest → catalog/HopTableTest (rename)
The catalog ScriptImplementorTest was testing HopTable.implement(),
not ScriptImplementor (which lives in hoptimator-util). Renamed to
HopTableTest to reflect the class actually under test.
Schema validation cleanup
-------------------------
KafkaSchemaValidationTest, MySQLSchemaValidationTest, and
VeniceSchemaValidationTest are deleted. Each is fully superseded by a
quidem .id test that uses the !describe command added in #203:
kafka-ddl.id, mysql-ddl.id, venice-ddl-insert-partial.id
The quidem tests cover the same schema assertions and additionally
verify INSERT operations and deployment specs.
Net: 8 files deleted, 5 modified/created; -366 lines, no coverage loss.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent 188bb4b commit 7db5c2c
16 files changed
Lines changed: 2546 additions & 3021 deletions
File tree
- hoptimator-avro/src/test/java/com/linkedin/hoptimator/avro
- hoptimator-catalog/src/test/java/com/linkedin/hoptimator/catalog
- hoptimator-k8s/src/test/java/com/linkedin/hoptimator/k8s
- hoptimator-kafka/src/test/java/com/linkedin/hoptimator/kafka
- hoptimator-mysql/src/test/java/com/linkedin/hoptimator/mysql
- hoptimator-operator/src/test/java/com/linkedin/hoptimator/operator/subscription
- hoptimator-util/src/test/java/com/linkedin/hoptimator/util/planner
- hoptimator-venice/src/test/java/com/linkedin/hoptimator/venice
Lines changed: 178 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
497 | 503 | | |
498 | 504 | | |
499 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
500 | 678 | | |
0 commit comments