Skip to content

Add integration test and example jar.#714

Merged
jean-philippe-martin merged 1 commit into
googleapis:gcs-niofrom
jean-philippe-martin:integration-tests
Mar 25, 2016
Merged

Add integration test and example jar.#714
jean-philippe-martin merged 1 commit into
googleapis:gcs-niofrom
jean-philippe-martin:integration-tests

Conversation

@jean-philippe-martin
Copy link
Copy Markdown

The integration tests exercise the actual GCS and make sure we can read and write. They use environment variables so we should be able to set them up for Travis.

This also includes an example that illustrates how we can add a jar to an existing project to give it the ability to read/write GCS files.

This example relies on making a "fat" jar. We have multiple options there:

  • option A: no fat jar at all.
    pro: you can still add GCS support via recompiling code and adding gcloud-nio as a maven dependency
    con: adding GCS support without recompiling is now super-annoying because you need to add a ton of jars. This greatly diminishes NIO's magic.
  • option B: the example jar is fat (so contains gcloud)
    pro: you can run it with a simple command line, and adding the nio jar gets you GCS support. No change to the other jars, the ones you're likely to actually use.
    con: this isn't representative of adding GCS support to legacy binaries, because they won't link those dependencies already.
  • option C: the NIO jar is fat.
    pro: by adding this jar to the classpath you can super-easily add GCS support to legacy code. You can still also use a maven dependency if you prefer.
    con: if you're trying to add GCS NIO to something that already has some gcloud support, you get redundant jars (unless use the maven deps).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants