-
Notifications
You must be signed in to change notification settings - Fork 129
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
support Junit5 parallel execution #1472 #1519
Conversation
this.currentDuration -= start; | ||
} | ||
this.setCurrentState(item, TestResultState.Running, 0); | ||
this.setDurationAtStart(this.getCurrentState(item)); |
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.
(not all changes to this method are strictly necessary, but I felt it becoming a bit lengthy now, so I extracted some details into separate methods)
(eclipse-jdt/eclipse.jdt.ui#378 will need to be resolved before this feature will work correctly) |
@fladdimir Thank you for taking look into this and deal with the upstream issue. Will it be fine if I review this PR after the upstream changes are merged? |
@jdneo of course thats fine, thanks for the quick reply |
Manual tests (including the locally built upstream fix for the RemoteTestRunner): before - test2 appears not to be run at all, swallowing its failure: fixed - both test failures are shown, comparison failures and traces are placed correctly: |
@jdneo the upstream PR has been merged. Unfortunately I am not familiar with the workflow. I assume the upstream artifact ( |
Cool! I saw the upstream PR has been merged, great job! The workflow looks like in this way:
I can help update the |
test/test-projects/junit/src/test/java/junit5/ParallelExecutionTest.java
Outdated
Show resolved
Hide resolved
That sounds great, thanks a lot! |
48a5910
to
ff57ce2
Compare
Awesome work @fladdimir! When I was looking into this I was noticing the issues regarding the interleaving of messages from the eclipse provided unit test runner - great job finding the cause of the issue and working to resolve it! |
I raised a PR to update the dependency in VS Code Java: eclipse-jdtls/eclipse.jdt.ls#2403. since it's about to release a new version this week, that PR should be able to be merged after the release (late this week) |
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 looked the PR today and overall it looks good! 👍
After the latest pre-release of vscode-java is available, I'll play with it manually and merge this PR if everything works fine.
// tests may be run concurrently, so each item's current state needs to be remembered | ||
private currentStates: Map<TestItem, CurrentItemState> = new Map(); | ||
|
||
// failure info for a test is received consecutively: | ||
private currentItem: TestItem | undefined; |
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.
nit: how about give it a more specific name, something like: tracingItem
?
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.
just changed the name 👍🏼
ff57ce2
to
2b6530c
Compare
While debugging I realized that this duplication of diff-messages also occurs during normal test execution on the current main branch, without being related to parallel test execution. Apparently its a problem of the general stack trace processing, occuring when a failing equality assertion stack trace contains multiple entries from the test class(?). (Non-concurrently executed) sample based on the current main branch: There is also a unit-test (part of
I'd like to continue investigating, however, would it be ok to open a separate issue for this? |
Sorry for the late reply. I'm on vacation these days :) Yes, I can confirm that this bug can also be observed in the marketplace version. And it's totally fine to deal with it in a separate issue. Thank you for the contribution! |
no worries at all - thanks for the review and merge! |
resolves #1472