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

Introduce Arquillian adapter #2481

Merged
merged 1 commit into from
May 22, 2019
Merged

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented May 17, 2019

@mkouba
Copy link
Contributor Author

mkouba commented May 17, 2019

@bartoszmajsak Could you pls look at the arquillian parts?

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootstrap CL setup looks good to me. One thing you may want to consider is closing appCl at the end. On Windows it may lock whatever was loaded.

gsmet
gsmet previously requested changes May 17, 2019
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting addition. I added a couple of comments inline.

Some are questions, some are purely cosmetic but we really need to fix the skipped deployment ones.

@bartoszmajsak
Copy link

@bartoszmajsak Could you pls look at the arquillian parts?

Sure, will do this today.

@bartoszmajsak
Copy link

@mkouba one question though, since it's labeled coding-in-progress can you share a task list of what needs to be done before this can be merged?

BTW - instead of using labels you could also use draft PRs.

Copy link

@bartoszmajsak bartoszmajsak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this work @mkouba. I see that we have just two smoke tests here. Is TCK the place with more sophisticated tests and that's where this adapter is going to be used?

I shared a few points to discuss.


List<Consumer<BuildChainBuilder>> customizers = new ArrayList<>();
try {
// Test class is a bean

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extract to a method for better readability?

try {
testClassesLocation = PathTestHelper.getTestClassesLocation(testJavaClass);
} catch (Exception e) {
// TCK tests are usually located in a dependency jar

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth logging a warning here? Are we sure every exception can be handled by falling back to target/test-classes?

@geoand
Copy link
Contributor

geoand commented May 17, 2019

I'm not terribly familiar with Arquillian, is there anything in particular that you would like me to review @mkouba?

@@ -0,0 +1,6 @@
package io.quarkus.tck.config;

// We need this class so that target/test-classes is added to the class path?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What breaks if target/test-classes isn't on the classpath?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it seems that surefire does not create a test classloader and I think we need this because of how framework classes are loaded. But I can try it again since I changed the code to use the BootstrapClassLoaderFactory...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails without the dummy class. Maybe @stuartwdouglas or @aloubyansky would know why?

- resolves quarkusio#206
- make use of BootstrapClassLoaderFactory
- register HTTPContext to make @ArquillianResource URI injectable
- add TCK parent pom and skipNexusStagingDeployMojo
- close the app CL after the test
- add profile to run tcks
@mkouba mkouba force-pushed the arquillian-next branch from 73455cd to 66542f5 Compare May 21, 2019 09:35
@mkouba mkouba requested a review from gsmet May 21, 2019 11:07
@mkouba
Copy link
Contributor Author

mkouba commented May 21, 2019

I've tried to address most of the comments (thanks all reviewers!) and I think that this PR is currently in a "ready-to-merge" state. Note that this Arquillian adapter is NOT going to be promoted as an official way of testing quarkus apps - it's purpose is to run MP TCKs (at least for now). In other words, I believe it's good enough for this purpose and of course we can always improve it later.

PS. I feel like I have nothing more to say about this subject. I'd be more than happy if anyone can "take over the baton" and for example try configure other TCKs.

@kenfinnigan
Copy link
Member

@gsmet I think all your comments have been resolved. Can you re-review.

@kenfinnigan kenfinnigan dismissed gsmet’s stale review May 22, 2019 15:44

I believe all concerns were resolved

@kenfinnigan kenfinnigan merged commit ca089c8 into quarkusio:master May 22, 2019
@kenfinnigan kenfinnigan added this to the 0.16.0 milestone May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Arquillian adapter
8 participants