micronaut-projects / micronaut-kafka

Integration between Micronaut and Apache Kafka
Apache License 2.0
86 stars 107 forks source link

Multi-language documentation for Quickstart example #822

Closed wetted closed 1 year ago

wetted commented 1 year ago

@sdelamo @timyates I'm puzzled why the test-suite test case fails. It passes locally for me every time. Ugh.

sdelamo commented 1 year ago

it was failing for me locally as well. I have fixed the tests.

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

timyates commented 1 year ago

I still think

    static {
        MY_KAFKA = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:latest"))
        MY_KAFKA.start()
    }

Is an anti-pattern especially in Spock tests

sdelamo commented 1 year ago

I still think

    static {
        MY_KAFKA = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:latest"))
        MY_KAFKA.start()
    }

Is an anti-pattern especially in Spock tests

Please, @timyates send an additional PR.

timyates commented 1 year ago

https://github.com/micronaut-projects/micronaut-kafka/pull/824

👍

wetted commented 1 year ago

824

@sdelamo @timyates The reason I wasn't using the AbstractKafkaTest in my new examples, but left it is because the docs recommend using micronaut-test-resources which is what I intended for new examples. However, the docs have a section and example of using Testcontainers directly, thus AbstractKafkaTest. See https://micronaut-projects.github.io/micronaut-kafka/latest/guide/#kafkaDockerized

We need the same fix for the Java and Kotlin AbstractKafkaTest docs examples. I'll do that on my next PR.

wetted commented 1 year ago

825