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
docs(sample): Add Native Image sample for Storage #1283
Conversation
Warning: This pull request is touching the following templated files:
|
Checkstyle is failing. |
Hm yeah, it looks it's happening in a couple of PRs and repos. We can wait until it is resolved. |
|
#1286 should fix the checkstyle problem once it's merged. |
samples/native-image-sample/src/test/java/com/example/storage/NativeImageStorageSampleIT.java
Outdated
Show resolved
Hide resolved
@Before | ||
public void setUp() { | ||
bout = new ByteArrayOutputStream(); | ||
System.setOut(new PrintStream(bout)); |
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.
Additionally, this is bad in that it leaves stdout like this after the tests finish running. So any thing else that might try to write to stdout would still go into memory.
LGTM, You might need to rebase to resolve the conflicts from owlbot in README.md. Feel free to merge once able. |
Thank you! |
This PR copies over the Storage sample, Setup Instructions and README for native image support from GoogleCloudPlatform/native-image-support-java. It also adds an integration test that can be run as a native image.
Calling
mvn package -Pnative -DskipTests
builds the native image for the application and callingmvn test -Pnative
runs the test as a native image.For more information: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration
If you write sample code, please follow the samples format.