diff --git a/.gitignore b/.gitignore index 880d706..c850c11 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,5 @@ pom.xml.versionsBackup /extension-test.properties /.testcontainers-tmp-* + +.settings \ No newline at end of file diff --git a/extension/src/extension.test.ts b/extension/src/extension.test.ts index b5ddf4b..7630f74 100644 --- a/extension/src/extension.test.ts +++ b/extension/src/extension.test.ts @@ -60,6 +60,9 @@ describe("Kafka Connector Extension", () => { function setScript(name: string, className: string, version = EXTENSION_DESCRIPTION.version): ExaScriptsRow { return script({ name, inputType: "SET", text: text(name, className, version) }) } + function scalarScript(name: string, className: string, version = EXTENSION_DESCRIPTION.version): ExaScriptsRow { + return script({ name, inputType: "SCALAR", text: text(name, className, version) }) + } it("returns empty list when no adapter script is available", () => { expect(findInstallations([])).toHaveLength(0) @@ -82,6 +85,9 @@ describe("Kafka Connector Extension", () => { ] expect(() => findInstallations(scripts)).toThrowError(new PreconditionFailedError(`Not all scripts use the same version. Found 2 different versions: '${currentVersion}, 0.0.0'`)) }) + + describe("returns expected installations", () => { + }) }) describe("install()", () => { diff --git a/pom.xml b/pom.xml index bab2c20..6f1c80d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,11 +13,9 @@ 11 2.13.3 2.13 - src/main/,extension/src/ + . + src/main/** extension/src/*.test.ts - src/test/,extension/src - src/test/,*.test.ts - extension/coverage/lcov.info @@ -214,7 +212,6 @@ org.apache.kafka kafka-clients 3.5.1 - test diff --git a/src/test/java/com/exasol/cloudetl/kafka/ExtensionIT.java b/src/test/java/com/exasol/cloudetl/kafka/ExtensionIT.java index 6061234..50a0429 100644 --- a/src/test/java/com/exasol/cloudetl/kafka/ExtensionIT.java +++ b/src/test/java/com/exasol/cloudetl/kafka/ExtensionIT.java @@ -224,7 +224,7 @@ private void assertInstalledVersion(final String expectedName, final String expe final List installations = setup.client().getInstallations(); final InstallationsResponseInstallation expectedInstallation = new InstallationsResponseInstallation() .name(expectedName).version(expectedVersion); - // The extension definition is installed twice (previous and current version), so each one returns the same installation. + // The extension is installed twice (previous and current version), so each one returns the same installation. assertAll(() -> assertThat(installations, hasSize(2)), () -> assertThat(installations.get(0), equalTo(expectedInstallation)), () -> assertThat(installations.get(1), equalTo(expectedInstallation))); @@ -241,11 +241,18 @@ private PreviousExtensionVersion createPreviousVersion() { private void verifyImportWorks() { final ExasolSchema schema = exasolObjectFactory.createSchema("TESTING_SCHEMA_" + System.currentTimeMillis()); + try { + final Table targetTable = schema.createTableBuilder("TARGET") + .column("SENSOR_ID", "INTEGER").column("STATUS", "VARCHAR(10)") // .column("KAFKA_PARTITION", "DECIMAL(18, 0)").column("KAFKA_OFFSET", "DECIMAL(36, 0)").build(); + // CREATE CONNECTION (optional, see + // https://github.com/exasol/kafka-connector-extension/blob/main/doc/user_guide/user_guide.md#importing-records) + executeKafkaImport(targetTable, kafkaSetup); + assertQueryResult( "select sensor_id, status, kafka_partition,kafka_offset from " + targetTable.getFullyQualifiedName() + " order by sensor_id",