Skip to content

Improve test coverage of launch script #20335

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

Closed
wilkinsona opened this issue Feb 27, 2020 · 9 comments
Closed

Improve test coverage of launch script #20335

wilkinsona opened this issue Feb 27, 2020 · 9 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@wilkinsona
Copy link
Member

Fixing #18540 and #19716 is higher risk that we would like as the changes that appear to be necessary aren't covered particularly well by the launch script's integration tests. For example the tests focus on starting an app via init.d and the problem reported in #19716 happens when executing the jar directly.

@aivinog1
Copy link
Contributor

@wilkinsona Hello! I want to start to contribute and fix this issue. Do you mind if I start working on it?

@wilkinsona
Copy link
Member Author

Not at all. Thank you very much for the offer.

@mikesmithson
Copy link
Contributor

@wilkinsona - I would also like to give this a shot. Without a ton of context, are you saying that issues #18540 and #19716 cannot be addressed until test coverage of launch script is improved. Is there a test that needs additional test cases? Is this RepackagerTests.java? What tests do you see as being missing?

@wilkinsona
Copy link
Member Author

Thanks for the offer, @mikesmithson, but @aivinog1 is already looking at this one.

@aivinog1
Copy link
Contributor

aivinog1 commented Apr 7, 2020

@wilkinsona Hello. I have a question. Do we need in this task implement tests that start an application as systemd service? I don't see such tests in the project right now. And I stuck in writing a test that verifies that DEBUG variable works correctly (because as I can see we can't pass a variable in init.d service, besides modifying launch.script). So I can write such a test but not for init.d service.

@wilkinsona
Copy link
Member Author

wilkinsona commented Apr 9, 2020

Hello. I have a question. Do we need in this task implement tests that start an application as systemd service?

Testing as a systemd service would be nice in the longer term, but I don't think it's of most importance. I would focus on launching the jar directly as a root and non-root user.

And I stuck in writing a test that verifies that DEBUG variable works correctly

The behaviour of DEBUG is pretty low level and I think we could make some big improvements without getting to that level of testing. Focusing on the kind of testing that's currently done with init.d but for direct execution will bring greater benefit, IMO

aivinog1 added a commit to aivinog1/spring-boot that referenced this issue Apr 28, 2020
@aivinog1
Copy link
Contributor

@wilkinsona Hello, I've developed some tests and I want to understand, do I do them properly. How can you review them? I can send a Github link on my commit (by the way here it is: aivinog1@a1a97bb). Or I can open a new PR.
Can I open PR without full coverage and further will open PR on each test?

Thanks.

@wilkinsona
Copy link
Member Author

@aivinog1 They look good to me. Thank you very much. Please do open a PR when you have a moment and then we can go through a proper review.

aivinog1 added a commit to aivinog1/spring-boot that referenced this issue May 11, 2020
@philwebb
Copy link
Member

Closing in favor of PR #21388

@philwebb philwebb removed this from the 2.2.x milestone May 30, 2020
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed type: task A general task labels May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

5 participants