Skip to content

Commit fdee3a2

Browse files
committed
exclusion kafka works!
1 parent 290fc9e commit fdee3a2

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2626
restore-keys: ${{ runner.os }}-m2
2727
- name: Build with Maven
28-
run: ./mvnw -B package --file pom.xml -Pscala-2.12 -Dkotlin-spark-api-3.2.test.excludes="org.jetbrains.kotlinx.spark.api.KafkaStreamingTest"
28+
run: ./mvnw -B package --file pom.xml -Pscala-2.12 -Dkotest.tags="!Kafka"
2929
# vim: ts=2:sts=2:sw=2:expandtab

kotlin-spark-api/3.2/src/test/kotlin/org/jetbrains/kotlinx/spark/api/KafkaStreamingTest.kt

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020
package org.jetbrains.kotlinx.spark.api
2121

22+
import io.kotest.core.Tag
2223
import io.kotest.core.spec.style.ShouldSpec
2324
import io.kotest.matchers.collections.shouldBeIn
2425
import org.apache.kafka.clients.consumer.ConsumerConfig
@@ -33,39 +34,14 @@ import org.apache.spark.streaming.kafka010.LocationStrategies
3334
import org.jetbrains.kotlinx.spark.api.tuples.*
3435
import java.io.Serializable
3536

37+
object Kafka : Tag()
38+
3639
class KafkaStreamingTest : ShouldSpec({
37-
context("kafka") {
3840

39-
// val kafka = install(
40-
// TestContainerExtension(KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:6.2.1")))
41-
// ) {
42-
// withEmbeddedZookeeper()
43-
// }
44-
//
45-
// should("support kafka streams") {
46-
// val topic1 = "test1"
47-
// val topic2 = "test2"
48-
//
49-
// val producer = kafka.createStringStringProducer()
50-
// producer.send(ProducerRecord(topic1, "Hello this is a test test test"))
51-
// producer.send(ProducerRecord(topic1, "Hello this is a test test test"))
52-
// producer.send(ProducerRecord(topic1, "Hello this is a test test test"))
53-
// producer.send(ProducerRecord(topic1, "Hello this is a test test test"))
54-
// producer.send(ProducerRecord(topic2, "This is also also a test test something"))
55-
// producer.send(ProducerRecord(topic2, "This is also also a test test something"))
56-
// producer.send(ProducerRecord(topic2, "This is also also a test test something"))
57-
// producer.send(ProducerRecord(topic2, "This is also also a test test something"))
58-
// producer.close()
59-
//
60-
// val consumer = kafka.createStringStringConsumer {
61-
// this[ConsumerConfig.MAX_POLL_RECORDS_CONFIG] = 1
62-
// }
63-
//
64-
// consumer.subscribe(listOf(topic1))
65-
// val records = consumer.poll(Duration.ofSeconds(100))
66-
// records.shouldHaveSize(4)
67-
// records.print()
41+
// making sure it can be skipped on github actions since it times out
42+
tags(Kafka)
6843

44+
context("kafka") {
6945
val port = 9092
7046
val broker = "localhost:$port"
7147
val topic1 = "test1"

0 commit comments

Comments
 (0)