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

ApplicationComponentTest interferes with DiagnosticContextFilter #60

Closed
maybeec opened this issue Feb 19, 2019 · 2 comments
Closed

ApplicationComponentTest interferes with DiagnosticContextFilter #60

maybeec opened this issue Feb 19, 2019 · 2 comments
Assignees
Labels
bug Something isn't working spring springframework and spring-boot test
Milestone

Comments

@maybeec
Copy link
Member

maybeec commented Feb 19, 2019

Inheriting ApplicationComponentTest, which sets webEnvironment = NONE, tests fail as of the WebConfig shipped by the archetype creates a diagnosticContextFilter, which needs to get the WebApplicationContext injected. So every test fails as there is no WebApplicationContext.

A solution would be to remove webEnvironment from the SpringBooTest annotation of ApplicationComponentTest, which would leed SpringBoot mock the WebApplicationContext by default.

@maybeec maybeec added the bug Something isn't working label Feb 19, 2019
maybeec added a commit to maybeec/devon4j that referenced this issue Feb 19, 2019
maybeec added a commit to maybeec/devon4j that referenced this issue Mar 11, 2019
hohwille pushed a commit that referenced this issue Mar 18, 2019
…nent tests (#61)

* #60 fixed

* #60 fix explicit declaration
@maybeec
Copy link
Member Author

maybeec commented Mar 18, 2019

Regarding your question of the PR. I need to do further debugging on why it happens for me this way. I was simply thinking it might be a global issue as the diagnosticContextFilter is already quite old. Nevertheless, mabye something to be more investigated at some point in time.

@hohwille
Copy link
Member

From #61 the question was:

However, our tests are not failing. Is that simply because we deliver our archetype without any component test in place? I am slightly confused as we have tests for the archetype and I would like to understand what is going wrong here. Did this never work? I have done many projects with devon and written component tests derived from this class without getting issues. Is that related to #63 ?

@hohwille hohwille added spring springframework and spring-boot test labels Mar 18, 2019
@hohwille hohwille added this to the release:3.1.0 milestone Mar 18, 2019
hohwille pushed a commit to hohwille/devon4j that referenced this issue May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spring springframework and spring-boot test
Projects
None yet
Development

No branches or pull requests

2 participants