aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/unit
Commit message (Collapse)AuthorAge
* Merge pull request #17642 from ericgribkoff/restore_fork_support_flagGravatar Eric Gribkoff2019-01-04
|\ | | | | restore cython flag value to default after test
| * restore cython flag value to default after testGravatar Eric Gribkoff2019-01-04
| |
* | Do not reload grpc in unit testsGravatar Eric Gribkoff2019-01-04
|/ | | | | | | | | | | | This can break subsequently run tests, including any which have already stored references to gRPC enums (such as grpc.StatusCode.OK). The subsequent tests will compare now be comparing the old enums to the reloaded enums, and they will not match. This causes errors in _metadata_code_details_test and a hang in _metadata_flags_test, when run in sequence locally after _logging_test. It's unclear why this has been working on Kokoro, but it is reproducible locally and is behavior that should be avoided.
* Merge pull request #17580 from grpc/expose-versionGravatar Richard Belleville2018-12-27
|\ | | | | Expose version
| * Make gRPC version string available as grpc.__version__Gravatar Richard Belleville2018-12-27
| |
* | Clean up server and channel objects in testsGravatar Eric Gribkoff2018-12-21
|/
* Merge pull request #17303 from lidizheng/sanity-python-3Gravatar Lidi Zheng2018-12-20
|\ | | | | Run pylint test in Python 3
* | bazel docker image does not support ipv6Gravatar Eric Gribkoff2018-12-17
| |
* | fix BUILD.bazelGravatar Eric Gribkoff2018-12-17
| |
* | Address comments, improve testsGravatar Eric Gribkoff2018-12-17
| |
* | disable fork test on windowsGravatar Eric Gribkoff2018-12-17
| |
* | add testsGravatar Eric Gribkoff2018-12-17
| |
* | Merge pull request #17466 from ericgribkoff/exit_testsGravatar Eric Gribkoff2018-12-14
|\ \ | | | | | | re-enable ExitTest
| * | re-enable unit._exit_test.ExitTestGravatar Eric Gribkoff2018-12-12
| | |
* | | New abort with grpc.Status APIGravatar Lidi Zheng2018-12-12
|/ / | | | | | | | | | | * Add `abort_with_status` method in ServicerContext * Add `Status` interface similar to the design of Details in interceptor * Add 3 unit test cases for abort mechanism
| * Upgrade sanity Docker image to debian:stretchGravatar Lidi Zheng2018-12-10
|/ | | | | | | | * Use latest pylint in Python 3.7 (they dropped support for PY2) * Make latest pylint happy * Forced to upgrade to shellcheck 0.4.4 * Make shellcheck 0.4.4 happy * Adopt reviewers' advice to reduce global disabled rules
* Pre-fix python3 pylint failuresGravatar Eric Gribkoff2018-12-06
|
* Surface exceptions from Cython to Python as much as possibleGravatar Lidi Zheng2018-11-27
|
* Merge pull request #17281 from lidizheng/issue-16718Gravatar Lidi Zheng2018-11-26
|\ | | | | Raise the exception while credential initialization
| * Raise the exception while credential initializationGravatar Lidi Zheng2018-11-26
| |
* | Remove BUILD.bazel files from beta code elementsGravatar Mehrdad Afshari2018-11-21
| | | | | | | | | | | | | | | | | | | | | | Beta code elements are going to get deprecated and Bazel support is much newer, so Bazel users are not supposed to accidentally depend on beta code elements. Preventing Bazel from building and including beta code elements makes our tests pass without depending on beta in grpcio target and helps avoid including that dependency accidentally if you are using Bazel.
* | python: close channels in _server_ssl_cert_config_testGravatar Eric Gribkoff2018-11-20
|/
* Use single NullHandler for whole libraryGravatar Richard Belleville2018-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was trying to get a feel for what the rest of the python ecosystem does with its logging, so I looked into the top few libraries on pypi: urllib3 maintains a logger for not quite every module, but for each one that does heavy lifting. The logger name is `__name__`, and no handlers are registered for any module-level loggers, including NullHandler. Their documentation spells out how to configure logging for the library. They explicitly configure a library root-level logger called `urllib3` to which they attach a `NullHandler`. This addresses the "no handlers could be found" problem. Their tests explicitly configure handlers, just like ours do. scrapy is more hands-on. It provides a configuration module for its logging and a whole document on how to handle logging with scrapy. It looks like log.py's whole reason for existence is making sure that a handler is attached to to the scrapy handler at startup. I think the extra complexity here is because scrapy also offers a CLI, so there has to be some way to configure logging without resorting to writing python, so I felt we didn't need to resort to this added complexity. --- Based on all of the libraries I've looked at, I think our current approach is reasonable. The one change I would make is to explicitly configure a `grpc` logger and to only attach a `NullHandler` to it instead of putting the burden on the author of each new module to configure it there. With this change, I have - Configured a logger in each module that cares about logging - Removed all NullHandlers attached to module-level loggers - Explicitly configured a `grpc` logger with a `NullHandler` attached Resolves: #16572 Related: #17064
* Merge pull request #16919 from lidizheng/wait-for-readyGravatar Lidi Zheng2018-11-07
|\ | | | | Add wait-for-ready semantics
| * Add wait-for-ready semanticsGravatar Lidi Zheng2018-11-06
| | | | | | | | | | | | * Include unit tests to test default behaviour, disable behaviour, enable behaviour of the wait-for-ready mechanism * Import flags constants from grpc_types.h * Use WaitGroup to wait for TRANSIENT_FAILURE state in unit test
* | Merge pull request #16976 from benjaminp/remove-pkg_resourcesGravatar Lidi Zheng2018-11-05
|\ \ | | | | | | Replace pkg_resources with pkgutil.
* | | Add support for utf-8 error messagesGravatar Lidi Zheng2018-11-05
| |/ |/| | | | | | | * Both server and client should be fine with utf-8 error messages now * Adding an interop test: special status message
| * Replace pkg_resources with pkgutil.Gravatar Benjamin Peterson2018-11-01
| | | | | | | | pkg_resources (part of setuptools) is overkill for reading resource files. The standard library module pkgutil can do that just fine.
* | Use custom assertionsGravatar Richard Belleville2018-11-01
| |
* | Isolate logging in all test casesGravatar Richard Belleville2018-11-01
| |
* | Appease the yapf godsGravatar Richard Belleville2018-10-31
| |
* | Add explicit test that user can configure their own handlerGravatar Richard Belleville2018-10-31
| |
* | Fix splatGravatar Richard Belleville2018-10-31
| |
* | Format codeGravatar Richard Belleville2018-10-31
| |
* | Pull out function to patch stderrGravatar Richard Belleville2018-10-31
| |
* | Add test for 'No handlers could be found' problemGravatar Richard Belleville2018-10-31
| |
* | Format codeGravatar Richard Belleville2018-10-31
| |
* | Fix various mind-numbing typosGravatar Richard Belleville2018-10-30
| |
* | Add basicConfig handler to unit testsGravatar Richard Belleville2018-10-30
| |
* | Add NullHandler to avoid warnings about no handlerGravatar Richard Belleville2018-10-30
| |
* | Add failing unit testGravatar Richard Belleville2018-10-30
|/
* fix Exception throw for invalid channel argsGravatar Lidi Zheng2018-10-14
| | | | | | * unit test included * throw ValueError exception from Cython to Python * prevent the deconstruction method from failing when Channel initialization failed
* Merge pull request #16335 from ghostwriternr/python_bazel_4Gravatar Nathaniel Manista2018-10-08
|\ | | | | Add Bazel targets for (some) Python unit tests.
| * Add Bazel targets for Python unit testsGravatar Naresh2018-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are exactly 50 tests under grpcio_tests/tests/testing and grpcio_tests/tests/unit for gRPC Python. Add Bazel targets for 44 of them. unit._reconnect_test has been left out for now due to an unexpected RuntimeError (#16336) and unit._server_ssl_cert_config_test because of changes needed to the import path within src/python/grpcio_tests/tests/testing/proto/services.proto (will possibly be included as a fix to #15370). The count of tests here is reported the way unittest counts tests, which is the number of individual unit test classes it sees. This will be different from Bazel's count, which counts the number of Bazel test targets, which (by convention mostly) is one per test module.
* | Support gRPC Python client-side fork with epoll1Gravatar Eric Gribkoff2018-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A process may fork after invoking grpc_init() and use gRPC in the child if and only if the child process first destroys all gRPC resources inherited from the parent process and invokes grpc_shutdown(). Subsequent to this, the child will be able to re-initialize and use gRPC. After fork, the parent process will be able to continue to use existing gRPC resources such as channels and calls without interference from the child process. To facilitate gRPC Python applications meeting the above constraints, gRPC Python will automatically destroy and shutdown all gRPC Core resources in the child's post-fork handler, including cancelling in-flight calls (see detailed design below). From the client's perspective, the child process is now free to create new channels and use gRPC.
* | Ensure thread_pool is not None for grpc.ServerGravatar Mehrdad Afshari2018-08-21
|/
* Minimal Bazel BUILD files for grpcio PythonGravatar Naresh2018-08-02
| | | | | Follow-up on the additions in #15992. Pad the grpcio Python package with necessary BUILD files along with 2 simple tests.
* Disable ChannelConnectivityTest for the Beta APIGravatar Mehrdad Afshari2018-07-25
| | | | | | The Beta API has been unsupported for a while and we plan to disable the flaky tests in the Beta API as we see them before we entirely remove it.
* Merge pull request #15689 from ↵Gravatar Nathaniel Manista2018-06-11
|\ | | | | | | | | nathanielmanistaatgoogle/generic-rpc-handler-validation Check conformance to grpc.GenericRpcHandler type.
* \ Merge pull request #15682 from mehrdada/bump-pylintGravatar Mehrdad Afshari2018-06-08
|\ \ | | | | | | Bump pylint to 1.9.2