-
Notifications
You must be signed in to change notification settings - Fork 228
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
Java ITs: Enable parallelization #7570
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.
Some minor questions
The warm-up doesn't seem to work as expected
|
bb198e3
to
18ca9e7
Compare
Seems like I forgot to delete a @BeforeClass
prepareCache...
@BeforeClass
deleteCache... And it was deleting the cache after fixing it again :) |
46c4a18
to
e6b6723
Compare
its/src/test/java/com/sonar/it/csharp/MetricsIncludeHeaderCommentTest.java
Show resolved
Hide resolved
869c8df
to
597d9ea
Compare
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.
Round 2, we need to figure out why it doesn't speed things up on CI before merging
its/pom.xml
Outdated
<!-- <threadCount>16</threadCount>--> | ||
<!-- <perCoreThreadCount>false</perCoreThreadCount>--> |
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.
The commented stuff should go away before merging
@@ -71,6 +71,10 @@ | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<configuration> | |||
<parallel>classes</parallel> |
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.
Are you testing this with C#-only run to get local data? While excluding the time needed to download SQ zip at the 1st local SQ-cache populating run?
Because from what I saw, surefire is stupid, JUnit is stupid, and they are not any smarter together in test discovery. So "parallel" might not play nicely with "Suite", only with the usual "run all at once" scaffolding
public static void init() throws IOException { | ||
TestUtils.deleteLocalCache(); | ||
// Analyze a project to avoid race conditions | ||
analyzeProject(temp, "Empty"); |
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.
In theory, you can skip the msbuild part. And just run "begin" and "end", where "end" will emit some useless warning that sarif report and other stuff was not configured for C# analysis.
You would just get project dir, execute begin step, execute end step. You can make it a method in TestUtils
that
- would
deleteLocalCache()
- could be made private then - would do the scanner thing
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.
There would also be no more accidental cache deletions
private static final String DIRECTORY = "MetricsTest:foo"; | ||
private static final String FILE = "MetricsTest:foo/Class1.cs"; | ||
private static final String PROJECT_DIR = "MetricsTest"; | ||
private static final String PROJECT_NAME = "MetricsTestIncludeHeaderComment"; |
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.
private static final String PROJECT_NAME = "MetricsTestIncludeHeaderComment"; | |
private static final String PROJECT_KEY = "MetricsTestIncludeHeaderComment"; |
597d9ea
to
764d575
Compare
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
Superseded by #7597 |
Part of #7557
Ignore first commit during review, it's a squash of
greg/remove-bulk-delete
parallel
option insurefire
inpom.xml
. Enabled parallelization at a class level.