(Français) Java: le projet Valhalla
Sorry, this entry is only available in Français.
Sorry, this entry is only available in Français.
Until recently, testing a Google Cloud Function written in Java could be done via the invoker provided by the Google Cloud Functions SDK but not via a unit test. But this changed recently! Let’s take the following HTTP function as an example: public class HelloHttpFunction implements HttpFunction { @Override public void service(HttpRequest httpRequest, HttpResponse httpResponse) throws Exception { Writer writer = httpResponse.getWriter(); writer.write(“Hello World”); } } After packaging the function into an über JAR, we can download the Google Cloud…