-
Notifications
You must be signed in to change notification settings - Fork 320
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
[WIP] use junit 5.9.2 in targets #2208
Conversation
Signed-off-by: Christian Dietrich <[email protected]>
@@ -6,7 +6,6 @@ | |||
</attributes> | |||
</classpathentry> | |||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | |||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/> |
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.
with the container tycho fails to resolve
without you have to select junit4 for the junit4 tests in run as dialogs. did not find a nice solution yet
see discussion in #2197
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.
We can create two launch configurations in the corresponding projects; one for JUnit4 and one for JUnit5.
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.
it is also about running single tests. currently in maintainance mode this is 50% of my usecases.
maybe there is also another option to make the vintage enginge visble to jdt.
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.
Didn't the discussion mention that the JUnit5 classpath container makes the import packages superfluous? Just using the classpath container without import packages still makes the build fail?
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 dont know.
the problem is we mix tests and a plugin.
and we need the imports for the plugin
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.
it is a plugin that is used in other plugins
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.
But in the the other projects, e.g., .dsl.tests, we always have the import packages or required packages for junit or jupiter anyway. I thought we'd never rely on the imported packages of xtext.testing.
I forgot to answer your question about running single tests: it's still possible, it's just that the first time it will try to run it with JUnit5, and you have to configure the single test launch configuration for JUnit4. If that's what you asked in previous comments. If you are talking about the annoyance of doing that, I agree ;) , that's why I was suggesting trying to stay with the classpath container.
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.
yes this is what i mean. you have to selct junit 4 in the dialog.
i have doubts a plugin can have code in osgi that is not on classpath. but i am not an osgi expert.
am also not sure how to properly test this.
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 can do some experiments on a separate branch
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.
we also seem to export stuff from the test folder in manifest
The class org.eclipse.xtend.ide.buildpath.Junit5LibClasspathAdder also maintains a list of junit bundles that probably has to be adapted too. |
this is a good question. it all is a mess and was even more with older eclipse and xtend versions. |
@LorenzoBettini @HannesWell any idea why this is not working |
@cdietrich I can reproduce it, but I have no idea why that's not working... even because that bundle is in the target platform... |
happens also in fresh eclipse. |
will close this one and create a rebased new on 2morrow |
use junit 5.9.2 in targets