- Notifications
You must be signed in to change notification settings - Fork 4.9k
Checkpointing Testing #3473
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
Checkpointing Testing #3473
Conversation
michel-tricot left a comment
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.
Terrific! Great idea to encode behaviors in testing sources & destinations
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| | ||
| public class E2ETestDestination extends BaseConnector implements Destination { |
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.
Except for the name, this is brilliant!
What about End2EndTestDestination or TestingDestination?
| } | ||
| ] | ||
| } | ||
| } No newline at end of file |
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.
NIT: newline
| /** | ||
| * This source is designed to be a switch statement for our suite of highly-specific test sourcess. | ||
| */ | ||
| public class E2ETestSource extends BaseConnector implements Source { |
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.
TestingSources
b2c9fb8 to c822c7b Compare c822c7b to 4de1bc7 Compare dba87c8 to ae161d7 Compare
davinchia left a comment
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.
Looks great! Feel free to merge after dealing with the names.
One clarification: the unused test source & destination are checked in for convenience right? (I'm just making sure I didn't miss any other tests that were using them)
| description: Connection not found | ||
| "422": | ||
| $ref: "#/components/responses/InvalidInput" | ||
| /v1/connections/get_state: |
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.
This is a good idea - people have been asking for this.
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.
I think they asked about /v1/connections/set_state: or /v1/connections/update_state: too, right?
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.
definitely! i'm looking for directionally correct here. I know this doesn't fully hit the edit state use case.
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.
shoudln't it be:
/v1/connections/state/get
or
/v1/state/get
| | ||
| RUN tar xf ${APPLICATION}.tar --strip-components=1 | ||
| | ||
| LABEL io.airbyte.version=0.3.1 |
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.
nit: 0.1.0
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.
good call. what if we go with dev here actually? not planning to publish this one.
| | ||
| integrationTestJavaImplementation "org.testcontainers:postgresql:1.15.1" | ||
| | ||
| implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs) |
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.
nit: move this out of the test dependencies
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.
why? the dockerfile still depends on that base image, no?
| | ||
| integrationTestJavaImplementation project(':airbyte-integrations:bases:standard-source-test') | ||
| | ||
| implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs) |
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.
nit: move this out of test dependencies.
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.
same.
| * SOFTWARE. | ||
| */ | ||
| | ||
| package io.airbyte.integrations.source.e2e_test; |
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.
haha I wrote the same version in Python!
| assertEquals(getRecordMessage(8L).getRecord().getData(), read.next().getRecord().getData()); | ||
| assertEquals(getRecordMessage(9L).getRecord().getData(), read.next().getRecord().getData()); | ||
| assertEquals(getRecordMessage(10L).getRecord().getData(), read.next().getRecord().getData()); | ||
| assertEquals(getStateMessage(10L).getState().getData(), read.next().getState().getData()); |
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.
is it worth checking for an exception here?
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.
yes. good call!
| description: Connection not found | ||
| "422": | ||
| $ref: "#/components/responses/InvalidInput" | ||
| /v1/connections/get_state: |
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.
shoudln't it be:
/v1/connections/state/get
or
/v1/state/get
aa941af to 81cce57 Compare …3290) * Migrate BufferedStreamConsumer users (e.g. all JDBC destinations, MeiliSearch) (#3473) * Add checkpointing test cases in Acceptance Tests (#3473) * Add testing for emitting state in Destination Standard Test (#3546) * Migrate BQ to support checkpointing (#3546) * Migrate copy destinations support checkpointing (#3547) * Checkpointing: Migrate CSV and JSON destinations (#3551)
What
How
ExceptionAfterNSourceandLoggingDestinationso that we could write an acceptance test for checkpointing. The strategy is that the source emits N records and then throws an exception. Then we verify that the state afterwards is still retained.Pre-merge Checklist
Add back pressure test that uses(punting this: Add back pressure test into src #3596)ThrottledDestinationandInfiniteFeedSourceRecommended reading order
E2ETestSource.javaE2ETestDestination.javaconfig.yaml┆Issue is synchronized with this Asana task by Unito