-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add generic test to test the per stream state behavior * Add missing dependency * Add test for the big query record consumer * Add license * Add missing newline
- Loading branch information
1 parent
daafb61
commit a837101
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...rc/test/java/io/airbyte/integrations/destination/bigquery/BigQueryRecordConsumerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.airbyte.integrations.destination.bigquery; | ||
|
||
import io.airbyte.integrations.base.AirbyteStreamNameNamespacePair; | ||
import io.airbyte.integrations.base.FailureTrackingAirbyteMessageConsumer; | ||
import io.airbyte.integrations.destination.bigquery.uploader.AbstractBigQueryUploader; | ||
import io.airbyte.integrations.standardtest.destination.PerStreamStateMessageTest; | ||
import io.airbyte.protocol.models.AirbyteMessage; | ||
import java.util.Map; | ||
import java.util.function.Consumer; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
public class BigQueryRecordConsumerTest extends PerStreamStateMessageTest { | ||
|
||
@Mock | ||
private Map<AirbyteStreamNameNamespacePair, AbstractBigQueryUploader<?>> uploaderMap; | ||
@Mock | ||
private Consumer<AirbyteMessage> outputRecordCollector; | ||
|
||
@InjectMocks | ||
private BigQueryRecordConsumer bigQueryRecordConsumer; | ||
|
||
@Override protected Consumer<AirbyteMessage> getMockedConsumer() { | ||
return outputRecordCollector; | ||
} | ||
|
||
@Override protected FailureTrackingAirbyteMessageConsumer getMessageConsumer() { | ||
return bigQueryRecordConsumer; | ||
} | ||
} |