-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bigtable: 19 - Implement integration tests #2997
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
Bigtable: 19 - Implement integration tests #2997
Conversation
4f55a01 to
efd2b05
Compare
|
|
||
| private ManagedChannel createChannel(int port) { | ||
| return ManagedChannelBuilder.forAddress("localhost", port) | ||
| .usePlaintext(true) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
The code LGTM. We should create a CircleCI task for this though. @igorbernstein2 Do you know what to do? @garrettjonesgoogle I think making CI run against prod for integration is OK? |
| void start() throws Exception { | ||
| int availablePort = getAvailablePort(); | ||
|
|
||
| process = Runtime.getRuntime().exec(executable + " -port " + "" + availablePort); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I updated this PR to include CircleCi configs. PTAL, if it looks ok, please merge |
TESTING.md
Outdated
|
|
||
| To use the `prod` environment: | ||
| 1. Create a table with a column family named `cf`. | ||
| 1. Setup the target table using `google-cloud-bigtable/scripts/setup-test-table.sh` |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @@ -0,0 +1,21 @@ | |||
| #!/usr/bin/env bash | |||
|
|
|||
| # Setup a table to use for integration tests. | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| public void run() { | ||
| try { | ||
| String line; | ||
| while ((line = reader.readLine()) != null) LOGGER.log(level, line); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| throw new RuntimeException( | ||
| "Unknown env: " | ||
| + env | ||
| + ". Please set the system propert " |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| testEnv = ProdEnv.fromSystemProperties(); | ||
| break; | ||
| default: | ||
| throw new RuntimeException( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
2be85a7 to
fc30c49
Compare
|
Rebased & addressed all feedback. If it looks ok, please merge |
|
Thanks! |
This is ready for review.
MVP of integration tests for Bigtable. All data rpcs are covered. The tests can be run against an emulator or a production instance of bigtable. For the time being, the emulator controller is implemented as a process wrapper around the cbtemulator binary that is managed by gcloud. The
gcloud emulatorcommand is bypassed because it executes the emulator as a child process, preventing java from killing it. The eventual goal is to publish the binaries wrapped in a jar and bypass gcloud altogether. The Emulator wrapper class is intentionally kept private in the tests directory to postpone committing to a public api.I setup the CircleCi configs and created the target table in the test project. Also, I updated the ITs to run in parallel and updated the verify_single_it.sh scripts to take additional args