Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testkit: Make Testcontainer logs visible #1281

Merged
merged 4 commits into from Dec 9, 2020

Conversation

seglo
Copy link
Member

@seglo seglo commented Dec 7, 2020

Testkit testcontainers feature to toggle container logs for ZooKeeper, Brokers, and Schema Registry.

Requires SLF4J.

@seglo
Copy link
Member Author

seglo commented Dec 7, 2020

2020-12-07 14:55:56,845 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: ===> Running preflight checks ... 
2020-12-07 14:55:56,847 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: ===> Check if /var/lib/zookeeper/data is writable ...
2020-12-07 14:55:57,145 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: ===> Check if /var/lib/zookeeper/log is writable ...
2020-12-07 14:55:57,459 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: ===> Launching ... 
2020-12-07 14:55:57,464 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: ===> Launching zookeeper ... 
2020-12-07 14:55:57,603 INFO  [va-stream--706609310] [a.k.t.t.logs.broker.broker-1        ]  STDOUT: ===> Launching kafka ... 
2020-12-07 14:55:57,771 INFO  [va-stream-1243764008] [a.k.t.t.logs.broker.broker-2        ]  STDOUT: ===> Launching kafka ... 
2020-12-07 14:55:57,797 INFO  [va-stream--446695805] [a.k.t.t.logs.broker.broker-0        ]  STDOUT: ===> Launching kafka ... 
2020-12-07 14:55:57,852 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: [2020-12-07 19:55:57,852] INFO Reading configuration from: /etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
2020-12-07 14:55:57,859 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: [2020-12-07 19:55:57,858] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
2020-12-07 14:55:57,859 INFO  [ava-stream-179986248] [a.k.t.testcontainers.logs.zookeeper ]  STDOUT: [2020-12-07 19:55:57,858] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)

@ennru
Copy link
Member

ennru commented Dec 8, 2020

Looks useful, great.

@seglo
Copy link
Member Author

seglo commented Dec 8, 2020

Thanks. I'm waiting for a failing build step to see how it looks.

@seglo seglo marked this pull request as ready for review December 8, 2020 18:20
Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -18,6 +18,8 @@ akka {
single-expect-default = 10s
}

kafka.testkit.testcontainers.container-logging = true
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit surprised we use reference.conf in IT tests, shouldn't this be application.conf?

Copy link
Member Author

Choose a reason for hiding this comment

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

That confused me as well. AFAIC it should be application.conf.

@ennru ennru changed the title Testcontainer logs Testkit: Make Testcontainer logs visible Dec 9, 2020
@ennru ennru merged commit 271433b into akka:master Dec 9, 2020
seglo added a commit that referenced this pull request Dec 21, 2020
@ennru
Copy link
Member

ennru commented Dec 22, 2020

This has been backported to the release-2.0.x branch to be part of 2.0.6.

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

Successfully merging this pull request may close these issues.

None yet

2 participants