-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Kinesis destination to use outputRecordCollector to properly s…
…tore state (#15348) * Update Kinesis destination to use outputRecordCollector to properly store state * Bump version * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
- Loading branch information
1 parent
a4e52cc
commit 964b226
Showing
7 changed files
with
64 additions
and
18 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
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
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
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
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
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
47 changes: 47 additions & 0 deletions
47
.../src/test/java/io/airbyte/integrations/destination/kinesis/KinesisRecordConsumerTest.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,47 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.integrations.destination.kinesis; | ||
|
||
import io.airbyte.integrations.base.FailureTrackingAirbyteMessageConsumer; | ||
import io.airbyte.integrations.standardtest.destination.PerStreamStateMessageTest; | ||
import io.airbyte.protocol.models.AirbyteMessage; | ||
import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; | ||
import java.util.function.Consumer; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@DisplayName("KinesisRecordConsumer") | ||
@ExtendWith(MockitoExtension.class) | ||
public class KinesisRecordConsumerTest extends PerStreamStateMessageTest { | ||
|
||
@Mock | ||
private Consumer<AirbyteMessage> outputRecordCollector; | ||
|
||
@Mock | ||
private ConfiguredAirbyteCatalog catalog; | ||
@Mock | ||
private KinesisStream kinesisStream; | ||
|
||
private KinesisMessageConsumer consumer; | ||
|
||
@BeforeEach | ||
public void init() { | ||
consumer = new KinesisMessageConsumer(catalog, kinesisStream, outputRecordCollector); | ||
} | ||
|
||
@Override | ||
protected Consumer<AirbyteMessage> getMockedConsumer() { | ||
return outputRecordCollector; | ||
} | ||
|
||
@Override | ||
protected FailureTrackingAirbyteMessageConsumer getMessageConsumer() { | ||
return consumer; | ||
} | ||
|
||
} |