Skip to content

Conversation

@igorbernstein2
Copy link

@igorbernstein2 igorbernstein2 commented Mar 6, 2018

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 emulator command 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

@igorbernstein2 igorbernstein2 requested a review from pongad as a code owner March 6, 2018 18:19
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 6, 2018
@igorbernstein2 igorbernstein2 changed the title WIP: Bigtable: 20 - Implement integration tests WIP: Bigtable: 19 - Implement integration tests Mar 6, 2018
@igorbernstein2 igorbernstein2 force-pushed the 19-impl-integration-tests branch from 4f55a01 to efd2b05 Compare March 8, 2018 03:59
@igorbernstein2 igorbernstein2 changed the title WIP: Bigtable: 19 - Implement integration tests Bigtable: 19 - Implement integration tests Mar 8, 2018

private ManagedChannel createChannel(int port) {
return ManagedChannelBuilder.forAddress("localhost", port)
.usePlaintext(true)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@pongad
Copy link
Contributor

pongad commented Mar 18, 2018

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.

@igorbernstein2
Copy link
Author

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.

@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Setup a table to use for integration tests.

This comment was marked as spam.

public void run() {
try {
String line;
while ((line = reader.readLine()) != null) LOGGER.log(level, line);

This comment was marked as spam.

throw new RuntimeException(
"Unknown env: "
+ env
+ ". Please set the system propert "

This comment was marked as spam.

testEnv = ProdEnv.fromSystemProperties();
break;
default:
throw new RuntimeException(

This comment was marked as spam.

@igorbernstein2 igorbernstein2 force-pushed the 19-impl-integration-tests branch from 2be85a7 to fc30c49 Compare March 20, 2018 18:53
@igorbernstein2
Copy link
Author

Rebased & addressed all feedback. If it looks ok, please merge

@garrettjonesgoogle garrettjonesgoogle merged commit b7102bb into googleapis:master Mar 20, 2018
@igorbernstein2
Copy link
Author

Thanks!

@igorbernstein2 igorbernstein2 deleted the 19-impl-integration-tests branch March 20, 2018 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants