Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Commit 80f2cd26 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

[WIP] add some test

parent d128b52f
Pipeline #7356 failed with stages
in 1 minute and 23 seconds
......@@ -57,9 +57,9 @@ dependencies {
// Compression
//implementation "org.apache.commons:commons-compress:1.19"
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
compile "org.jetbrains.kotlin:kotlin-script-runtime:1.3.71"
compile "org.jetbrains.kotlin:kotlin-reflect:1.3.71"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.71"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.71"
testCompile("org.junit.jupiter:junit-jupiter:5.4.2")
......@@ -89,7 +89,9 @@ sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.resources.srcDirs = [ "src/main/resources" ]
main.resources.includes = [ "**/*.yml", "**/*.xml"]
test.kotlin.srcDirs += 'src/test'
test.kotlin.srcDirs += 'src/test/kotlin'
test.resources.srcDirs = [ "src/test/resources" ]
test.resources.includes = [ "**/*.yml", "**/*.xml"]
}
plugins.withType(DistributionPlugin) {
......
......@@ -101,8 +101,7 @@ class SettingsLoader {
private fun addSetting(base: String): String {
val levels = base.split('.')
val settings = mappedYaml[base] as Map<String, Any>
return recursiveFunction(levels.first(), levels.drop(1), settings, base)
return recursiveFunction(levels.first(), levels.drop(1), mappedYaml, base)
}
private fun recursiveFunction(current: String, rest: List<String> , map: Map<String, Any>, base: String): String {
......@@ -159,7 +158,6 @@ class SettingsLoader {
private fun initKafkaStreamsSettings(): Properties {
val merger = KafkaSettings(suppliedKafkaStreamsSettings, log)
merger.setKafkaProperty(StreamsConfig.APPLICATION_ID_CONFIG, abortIfMissing = true)
merger.setKafkaProperty(StreamsConfig.CLIENT_ID_CONFIG, abortIfMissing = true)
merger.setKafkaProperty(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, abortIfMissing = true)
......@@ -170,6 +168,7 @@ class SettingsLoader {
merger.setKafkaProperty(StreamsConfig.ADMIN_CLIENT_PREFIX)
merger.setKafkaProperty(StreamsConfig.AT_LEAST_ONCE)
merger.setKafkaProperty(StreamsConfig.BUFFERED_RECORDS_PER_PARTITION_CONFIG)
merger.setKafkaProperty(StreamsConfig.CLIENT_ID_CONFIG)
merger.setKafkaProperty(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG)
merger.setKafkaProperty(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG)
merger.setKafkaProperty(StreamsConfig.CONNECTIONS_MAX_IDLE_MS_CONFIG)
......
/*
* sftp-reader
* record-parser
* Copyright (C) 2019 Memobase
*
* This program is free software: you can redistribute it and/or modify
......@@ -41,9 +41,6 @@ class Tests {
return File("$resourcePath/$fileName").readText(Charset.defaultCharset())
}
@Test
fun `test csv file import`() {
val factory = ConsumerRecordFactory(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment