Skip to content

Commit

Permalink
destination-e2e: upgrade CDK
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte committed Sep 18, 2024
1 parent 46fbf61 commit 0844477
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ abstract class DestinationAcceptanceTest(
*/
@Test
@Throws(Exception::class)
fun testSyncNotFailsWithNewFields() {
open fun testSyncNotFailsWithNewFields() {
if (!implementsOverwrite()) {
LOGGER.info { "Destination's spec.json does not support overwrite sync mode." }
return
Expand Down Expand Up @@ -2171,7 +2171,7 @@ abstract class DestinationAcceptanceTest(
}

// ignores emitted at.
protected fun assertSameMessages(
open protected fun assertSameMessages(
expected: List<AirbyteMessage>,
actual: List<AirbyteRecordMessage>,
pruneAirbyteInternalFields: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.20.6'
cdkVersionRequired = '0.45.0'
features = ['db-destinations']
useLocalCdk = false
useLocalCdk = true
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: file
connectorType: destination
definitionId: a7bcc9d8-13b3-4e49-b80d-d020b90045e3
dockerImageTag: 0.4.1
dockerImageTag: 0.5.0
dockerRepository: airbyte/destination-dev-null
githubIssueLabel: destination-dev-null
icon: airbyte.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test

class DevNullDestinationAcceptanceTest : DestinationAcceptanceTest() {
override fun getImageName(): String {
return "airbyte/destination-dev-null:dev"
}
override val imageName = "airbyte/destination-dev-null:dev"

override fun getConfig(): JsonNode {
return Jsons.jsonNode(
Expand All @@ -37,7 +35,7 @@ class DevNullDestinationAcceptanceTest : DestinationAcceptanceTest() {
}

override fun retrieveRecords(
testEnv: TestDestinationEnv,
testEnv: TestDestinationEnv?,
streamName: String,
namespace: String?,
streamSchema: JsonNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.20.6'
cdkVersionRequired = '0.45.0'
features = ['db-destinations']
useLocalCdk = false
useLocalCdk = true
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: unknown
connectorType: destination
definitionId: 2eb65e87-983a-4fd7-b3e3-9d9dc6eb8537
dockerImageTag: 0.4.1
dockerImageTag: 0.5.0
dockerRepository: airbyte/destination-e2e-test
githubIssueLabel: destination-e2e-test
icon: airbyte.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ constructor(
config: JsonNode,
catalog: ConfiguredAirbyteCatalog,
outputRecordCollector: Consumer<AirbyteMessage>
): AirbyteMessageConsumer {
): AirbyteMessageConsumer? {
return selectDestination(config)!!.getConsumer(config, catalog, outputRecordCollector)
}

@Throws(Exception::class)
override fun check(config: JsonNode): AirbyteConnectionStatus {
override fun check(config: JsonNode): AirbyteConnectionStatus? {
return try {
selectDestination(config)!!.check(config)
} catch (e: Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ThrottledDestination : BaseConnector(), Destination {

override fun getConsumer(
config: JsonNode,
catalog: ConfiguredAirbyteCatalog?,
catalog: ConfiguredAirbyteCatalog,
outputRecordCollector: Consumer<AirbyteMessage>
): AirbyteMessageConsumer {
return ThrottledConsumer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import org.junit.jupiter.params.provider.ArgumentsSource
import java.util.*

class TestingSilentDestinationAcceptanceTest : DestinationAcceptanceTest() {
override fun getImageName(): String {
return "airbyte/destination-e2e-test:dev"
}
override val imageName = "airbyte/destination-e2e-test:dev"

override fun getConfig(): JsonNode {
return Jsons.jsonNode(
Expand All @@ -42,9 +40,9 @@ class TestingSilentDestinationAcceptanceTest : DestinationAcceptanceTest() {

override fun retrieveRecords(
testEnv: TestDestinationEnv?,
streamName: String?,
namespace: String?,
streamSchema: JsonNode?
streamName: String,
namespace: String,
streamSchema: JsonNode
): List<JsonNode> {
return emptyList()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import java.util.*
import java.util.function.Consumer
import org.junit.jupiter.api.Test
import org.mockito.Mockito
import org.mockito.Mockito.mock

/**
* This source is designed to be a switch statement for our suite of highly-specific test sources.
Expand All @@ -30,7 +31,7 @@ class ThrottledDestinationTest {
)
)

val consumer = ThrottledDestination().getConsumer(config, null, outputRecordCollector)
val consumer = ThrottledDestination().getConsumer(config, mock(), outputRecordCollector)

consumer.accept(anotherRecord)
consumer.accept(anotherRecord)
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/destinations/e2e-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ The OSS and Cloud variants have the same version number starting from version `0

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------- |
| 0.4.1 | 2024-09-18 | [45649](https://github.com/airbytehq/airbyte/pull/45649) | convert test code to kotlin |
| 0.5.0 | 2024-09-18 | [45650](https://github.com/airbytehq/airbyte/pull/45650) | upgrade cdk |
| 0.4.1 | 2024-09-18 | [45649](https://github.com/airbytehq/airbyte/pull/45649) | convert test code to kotlin |
| 0.4.0 | 2024-09-18 | [45648](https://github.com/airbytehq/airbyte/pull/45648) | convert production code to kotlin |
| 0.3.6 | 2024-05-09 | [38097](https://github.com/airbytehq/airbyte/pull/38097) | Support dedup |
| 0.3.5 | 2024-04-29 | [37366](https://github.com/airbytehq/airbyte/pull/37366) | Support refreshes |
Expand Down

0 comments on commit 0844477

Please sign in to comment.