Skip to content

Conversation

@sekikn
Copy link

@sekikn sekikn commented Dec 2, 2025

Description

  • This PR adds docker-java.properties which specifies Docker client version explicitly so that the generated code using Testcontainers works with the recent version of Docker (29.0.0+). Upgrading Testcontainers to 2.0.2+ is a straightforward solution, but it introduces incompatible API change and will take some time to address. So this PR uses an alternative workaround. I tested it as follows:
$ npm t -- --runInBand

...

Test Suites: 6 passed, 6 total
Tests:       11 passed, 11 total
Snapshots:   51 passed, 51 total
Time:        4.829 s, estimated 11 s
Ran all test suites.
$ asyncapi generate fromTemplate tests/mocks/kafka.yml . -o /tmp/kafka
┌  AsyncAPI Generator
│
◇  Check out your shiny new generated files at /tmp/kafka.

$ cd /tmp/kafka
$ chmod +x gradlew
$ ./gradlew test --tests com.asyncapi.TestcontainerKafkaTest

...

BUILD SUCCESSFUL in 7s
5 actionable tasks: 1 executed, 4 up-to-date

Related issue(s)

Resolves #455

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Generated test using Testcontainers doesn't work with the recent version of Docker

1 participant