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

Add Windows build, fix NPE adding agent jar #227

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Conversation

apotterri
Copy link
Contributor

Add a GH action to run a build on Windows, Linux, and macOS.

Also, only try to add the agent jar to the classpath if its location is available.

Fix #225.

@apotterri apotterri force-pushed the windows-20231006 branch 2 times, most recently from 1bdba08 to 377bbe0 Compare October 10, 2023 11:16
@apotterri apotterri force-pushed the windows-20231006 branch 10 times, most recently from 7d3c454 to 9c643fd Compare October 10, 2023 20:16
@apotterri apotterri marked this pull request as draft October 10, 2023 20:40
Make various tweaks to allow tests to run in a Git Bash environment on a
GitHub build runner. This includes disabling a couple of tests that have
proved challenging to port. They run fine on other platforms, though,
which should be sufficient to show that the functionality works.

These changes also converts the files containing those tests to JUnit 5.
@apotterri apotterri force-pushed the windows-20231006 branch 12 times, most recently from fd895b2 to a6a367e Compare October 12, 2023 20:56
Use jcmd instead of ps. Add ExitController for PetClinic, use it to stop
the server, instead of trying to use kill.
The CodeSource and location of the agent jar's ProtectionDomain can both
be null (though the latter was only documented post-1.8). Only try to
add the jar if both are available.

Also, when the location URL is not null, convert it to a URI instead of
a Path. This works on all platforms.
@apotterri apotterri marked this pull request as ready for review October 12, 2023 22:05
@dustinbyrne dustinbyrne self-requested a review October 12, 2023 22:36
Copy link
Collaborator

@dustinbyrne dustinbyrne left a comment

Choose a reason for hiding this comment

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

Great to see this running cross-platfom! 👍 👍

@dustinbyrne dustinbyrne merged commit ca4bc1b into master Oct 12, 2023
4 checks passed
@dustinbyrne dustinbyrne deleted the windows-20231006 branch October 12, 2023 22:37
@appland-release
Copy link

🎉 This PR is included in version 1.22.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the agent fails on Windows
3 participants