Skip to content

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Sep 15, 2016

Also updating the pubsub system test with similar support for detection of the emulator at run-time rather than import time.

Fixes #2242.

FYI @garye this is the current output:

$ tox -e bigtable-emulator
GLOB sdist-make: .../google-cloud-python/setup.py
bigtable-emulator inst-nodeps: .../google-cloud-python/.tox/dist/google-cloud-0.18.0.zip
bigtable-emulator installed: enum34==1.1.6,future==0.15.2,futures==3.0.5,gax-google-logging-v2==0.8.1,gax-google-pubsub-v1==0.8.1,google-cloud==0.18.0,google-gax==0.12.5,googleapis-common-protos==1.3.4,grpc-google-logging-v2==0.8.1,grpc-google-pubsub-v1==0.8.1,grpcio==1.0.0,httplib2==0.9.2,oauth2client==3.0.0,ply==3.8,protobuf==3.0.0,psutil==4.3.1,py==1.4.31,pyasn1==0.1.9,pyasn1-modules==0.0.8,pytest==3.0.2,rsa==3.4.2,six==1.10.0
bigtable-emulator runtests: PYTHONHASHSEED='2409315821'
bigtable-emulator runtests: commands[0] | python .../google-cloud-python/system_tests/run_emulator.py --package=bigtable
test_read_row (bigtable.TestDataAPI) ... ok
test_read_rows (bigtable.TestDataAPI) ... ok
test_read_with_label_applied (bigtable.TestDataAPI) ... skipped 'Labels not supported by Bigtable emulator'
test_create_instance (bigtable.TestInstanceAdminAPI) ... skipped 'Instance Admin API not supported in Bigtable emulator'
test_list_instances (bigtable.TestInstanceAdminAPI) ... skipped 'Instance Admin API not supported in Bigtable emulator'
test_reload (bigtable.TestInstanceAdminAPI) ... skipped 'Instance Admin API not supported in Bigtable emulator'
test_update (bigtable.TestInstanceAdminAPI) ... skipped 'Instance Admin API not supported in Bigtable emulator'
test_create_column_family (bigtable.TestTableAdminAPI) ... ok
test_create_table (bigtable.TestTableAdminAPI) ... ok
test_delete_column_family (bigtable.TestTableAdminAPI) ... ok
test_list_tables (bigtable.TestTableAdminAPI) ... ok
test_update_column_family (bigtable.TestTableAdminAPI) ... ok

----------------------------------------------------------------------
Ran 12 tests in 0.018s

OK (skipped=5)
E0915 09:38:34.312954162    9877 network_status_tracker.c:48] Memory leaked as all network endpoints were not shut down
___________________________________________________________________ summary ___________________________________________________________________
  bigtable-emulator: commands succeeded
  congratulations :)

@dhermes dhermes added testing api: bigtable Issues related to the Bigtable API. labels Sep 15, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 15, 2016
@garye
Copy link
Contributor

garye commented Sep 15, 2016

LGTM, this is the right set of stuff to be skipping.

@dhermes
Copy link
Contributor Author

dhermes commented Sep 15, 2016

w00t.

tox.ini Outdated
python {toxinidir}/system_tests/run_emulator.py --package=bigtable
passenv =
GOOGLE_CLOUD_DISABLE_GRPC
deps = {[testenv:datastore-emulator]deps}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

wait_ready_prefix(popen, _PS_READY_LINE_PREFIX)


def bigtable_wait_ready(popen):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

}
_DS_READY_LINE = '[datastore] Dev App Server is now running.\n'
_PS_READY_LINE_PREFIX = '[pubsub] INFO: Server started, listening on '
_BT_READY_LINE_PREFIX = '[bigtable] Cloud Bigtable emulator running on '

This comment was marked as spam.

This comment was marked as spam.

if Config.IN_EMULATOR is not None:
self.skipTest(
'Instance Admin API not supported in Bigtable emulator')
self.instances_to_delete = []

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes dhermes force-pushed the add-bigtable-emulator branch from afc36e2 to c877adf Compare September 16, 2016 17:15
@dhermes
Copy link
Contributor Author

dhermes commented Sep 16, 2016

@daspecster @tseaver PTAL. (Also on LGTM, please remind me to squash.)

@daspecster
Copy link
Contributor

LGTM unless @tseaver has more.

@dhermes dhermes force-pushed the add-bigtable-emulator branch from c877adf to 6805312 Compare September 20, 2016 19:41
Also updating the pubsub system test with similar support
for detection of the emulator at run-time rather than
import time.

Fixes googleapis#2242.
@dhermes dhermes force-pushed the add-bigtable-emulator branch from 6805312 to b42bdc8 Compare September 20, 2016 19:41
@dhermes dhermes merged commit f5fb643 into googleapis:master Sep 20, 2016
@dhermes dhermes deleted the add-bigtable-emulator branch September 20, 2016 20:02
@garye
Copy link
Contributor

garye commented Sep 20, 2016

Glad to see this merged! Can we do a release on the back of this? We want to add emulator documentation that mentions the python support.

@dhermes
Copy link
Contributor Author

dhermes commented Sep 20, 2016

@garye #2242 is the real support needed, and that made it in 0.19.0 (released yesterday).

This change just makes sure maintainers (or any people who clone the repo) can periodicially check if the emulator is working.

@garye
Copy link
Contributor

garye commented Sep 20, 2016

Good to know, thanks @dhermes.

@dhermes
Copy link
Contributor Author

dhermes commented Sep 20, 2016

Sure thing

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

Labels

api: bigtable Issues related to the Bigtable API. cla: yes This human has signed the Contributor License Agreement. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants