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

Fix intermittent failure of messaging tests #1031

Merged
merged 1 commit into from Apr 6, 2020

Conversation

jamesnetherton
Copy link
Contributor

Fixes #1023

.withLogConsumer(new Consumer<OutputFrame>() {
@Override
public void accept(OutputFrame outputFrame) {
System.out.println(outputFrame.getUtf8String());
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be replaced by slf4j ? (I think there is a facility from testcontainers)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah but most of the content coming back from the container is already log formatted. So it gets messy if you wrap it in more formatting. Hence I just write it as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove the logging altogether if you'd prefer. It's just useful for debugging if we hit issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant this one that should properly handle the output frame.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can remove the logging altogether if you'd prefer. It's just useful for debugging if we hit issues.

No worries we can keep it, was just wondering if we can make it gogin to the logger so we can control it from properties, but not a huge issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Latest commit uses Slf4jLogConsumer 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

does it work as advertised ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Works ok. Everything gets prefixed with STDOUT:, so at least it's clear what's coming from the container and what isn't.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yeah, that issue ... I think I did implement my own version some time ago, maybe I'll copy over this repo, if only I could remember where it it

@jamesnetherton jamesnetherton merged commit 22b7540 into apache:master Apr 6, 2020
@jamesnetherton jamesnetherton deleted the jms-test-enable branch April 6, 2020 08:08
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.

Intermittent failure of messaging tests
3 participants