-
Notifications
You must be signed in to change notification settings - Fork 297
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
Development
: Execute architecture tests during java style action
#7160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea behind faster feedback from Architecture Tests, especially for new developers 👍
However, the action now takes ~4:15 instead of ~2:30 minutes
AbstractArchitectureTest extends the BambooBitbucketJiraTest and therefore requires a lengthy server start (e.g., locally, the architecture tests run in less than two seconds, but with the server start, the tests took 34 seconds)
Most tests in the inheriting classes (ArchitectureTest, AuthorizationTest & FeedbackArchitectureTest) seem to be Unit Tests already. The only test actually requiring an application context is the testEndpoints()
Test in the AuthorizationTest class.
Maybe we could move this one test somewhere else and make the entire AbstractArchitectureTest a Unit test, preventing the lengthy server start?
If we add an @Tag('ServerStyleTest')
(JUnit Docs: Tags) annotation to the AbstractArchitectureTest, we should also be able to start all Tests extending the AbstractArchitectureTest (./gradlew test -DincludeTags='ServerStyleTest'
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this improvement @Strohgelaender and thank you for the suggestion @jakubriegel.
This will help us, and especially new developers, detect architecture failures much faster 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very nice addition. Thanks for implementing it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for that change!
Development
: Execute Architecture tests during java style actionDevelopment
: Execute architecture tests during java style action
Order got reshuffled by #7160 after we have already fixed many flaky tests. A fixed order might mitigate this issue. Co-Authored-By: Lara Dvorsek <[email protected]>
Checklist
General
Motivation and Context
We use architecture tests with ArchUnit to ensure that the code follows some general rules.
@jakubriegel pointed out that these tests are currently only run during a full server test run, which can take a while. Instead of letting developers wait until all server tests are finished, these special tests should be executed separately to quickly review issues.
Description
We now execute the ArchitecureTests directly in the server-style action.
Steps for Testing
code review
Review Progress
Code Review
Screenshots