-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destination acceptence test : improve comparison methods #11579
Conversation
… aleonets/add-dat-tests-ph1
Basic - old implementation which provides backward compatibility of this PR. Advanced - comparator required for destinations with enabled DAT tests.
This comment was marked as outdated.
This comment was marked as outdated.
/test connector=connectors/destination-mysql
Invalid master version |
...ava/io/airbyte/integrations/standardtest/destination/comparator/BasicTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
...ava/io/airbyte/integrations/standardtest/destination/comparator/BasicTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
/test connector=connectors/destination-mssql
|
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Outdated
Show resolved
Hide resolved
.../io/airbyte/integrations/standardtest/destination/comparator/AdvancedTestDataComparator.java
Show resolved
Hide resolved
…are it with actualObject elements. Expected might have empty elements and they are equal missing element in the actual Object. Also, actualObject might contain additional elements which is not an exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for being patient here!
* add Boolean, Number, DateTimeWithTZ compare methods * Improve value comparison * Compare inherit objects element by element * Move comparison methods to a new class not to overload the test class. Basic - old implementation which provides backward compatibility of this PR. Advanced - comparator required for destinations with enabled DAT tests. * format * Move common method to ComparatorUtils. + Review update * format * review * review * mark resolveIdentifier method as deprecated * remove size objects validation. We iterate expected elements and compare it with actualObject elements. Expected might have empty elements and they are equal missing element in the actual Object. Also, actualObject might contain additional elements which is not an exception.
What
New destination acceptance tests (#9443) contain more complicated cases. Some destinations require more flexible methods of comparison.
How
Use specific comparison methods instead of comparing all values as text.
Note
The current implementation keeps old comparison methods by default.
To turn on the new DAT tests for a destination, overwrite methods
supportBasicDataTypeTest
,supportArrayDataTypeTest
,supportObjectDataTypeTest
andgetTestDataComparator
.The
AdvancedTestDataComparator.java
is the new version of the comparator, which can be extended by a destination-specific version.Recommended reading order
DestinationAcceptanceTest.java
TestDataComparator.java
BasicTestDataComparator.java
AdvancedTestDataComparator.java