Commit Graph

449 Commits

Author SHA1 Message Date
Brad Fitzpatrick fc0c458b89 Fix test-only goroutine leaks; add leak checker to end2end tests.
Some leaks remain, so this is disabled for now.

Updates grpc/grpc-go#528
2016-02-08 15:03:15 +00:00
Qi Zhao a0f854fec2 Merge pull request #515 from bradfitz/fatalf
Don't call t.FailNow in goroutines started by tests.
2016-02-01 12:50:34 -08:00
Brad Fitzpatrick 8024a575aa Don't call t.FailNow in goroutines started by tests.
The docs at https://golang.org/pkg/testing/#T.FailNow say:

> FailNow must be called from the goroutine running the test or
> benchmark function, not from other goroutines created during the
> test.

(Fatalf is documented as "Fatalf is equivalent to Logf followed by
FailNow.")

This was manifesting itself as a race with two concurrently failing
goroutines in my other CL, masking whatever the real problem was.
2016-02-01 19:15:37 +00:00
iamqizhao af8888dc8d remove Compressor/DecompressorGenerator 2016-01-29 14:38:20 -08:00
iamqizhao 6d87263bd5 add test 2016-01-27 18:34:24 -08:00
iamqizhao 61d7c39d4c comments and gofmt 2016-01-25 11:18:41 -08:00
iamqizhao da3bb0c9f7 Support compression 2016-01-22 18:21:41 -08:00
iamqizhao 6ef6ed778a test peer addr 2016-01-06 19:04:19 -08:00
iamqizhao b36c5c6fd9 Expose peer info 2016-01-06 18:20:01 -08:00
iamqizhao a98f0170cf fix some print format errors 2015-12-16 11:36:52 -08:00
iamqizhao 330d8f958c i) revise picker API and channel state API; ii) add unicastNamingPicker which supports custom name resolving. 2015-12-14 14:32:43 -08:00
iamqizhao cb8841c36e move some tests from end2end.go to clientconn_test.go 2015-11-06 11:33:13 -08:00
iamqizhao afca514667 Improve rpc cancellation when there is no pending I/O 2015-10-22 13:07:13 -07:00
iamqizhao f13f7f6db6 cleanup a test 2015-10-22 11:56:32 -07:00
iamqizhao 78e8635e67 cleanup a test 2015-10-22 11:55:01 -07:00
iamqizhao 7fcfcfa816 fix a counting race for max streams. 2015-10-22 11:00:21 -07:00
iamqizhao 17b181003d remove debug info 2015-10-21 15:24:16 -07:00
iamqizhao e18e2c8054 fix a bug in test 2015-10-21 15:21:58 -07:00
iamqizhao 67646dc278 update health check to the latest version 2015-09-17 14:36:11 -07:00
Tamir Duberstein fe58c815dd tests: use `testing.{B,T}` or return errors instead of crashing 2015-09-11 14:27:38 -04:00
Tamir Duberstein a6fe03ae2e credentials.TLSInfo: export State 2015-09-08 14:30:17 -04:00
iamqizhao 9ba820ef6a add tests 2015-08-28 13:50:04 -07:00
iamqizhao 87c361b5a5 check transport security when using oauth2-based credentials 2015-08-28 13:19:36 -07:00
iamqizhao 996538ab4b Insecure ClientConn made explicit 2015-08-27 17:21:52 -07:00
iamqizhao f49ac9d0df rename Type() 2015-08-26 13:43:04 -07:00
iamqizhao ef3d58fc04 add test 2015-08-26 13:11:34 -07:00
iamqizhao c0e23d7ef3 make the tests happy 2015-08-26 12:40:24 -07:00
iamqizhao 97574c6499 make the test happy 2015-08-24 11:40:40 -07:00
yangzhouhan e1eaac2884 add empty string check 2015-08-13 18:15:11 -07:00
yangzhouhan 5a78be3dbb update healthCheck service 2015-08-13 15:16:59 -07:00
yangzhouhan 1f14f6f0c5 gofmt 2015-08-10 17:34:20 -07:00
yangzhouhan bf963e1bb3 change end2end test 2015-08-10 16:59:16 -07:00
yangzhouhan 54f53f005e remove unused code 2015-08-10 16:10:19 -07:00
yangzhouhan 484e2d96e5 change the metadata datastructure 2015-08-10 16:06:27 -07:00
iamqizhao 7fbf442f72 gofmt -w 2015-08-03 13:24:14 -07:00
iamqizhao aefa16d77f add a bit more test 2015-08-03 13:09:15 -07:00
iamqizhao 14702f8b6a channel state API 2015-07-31 19:00:43 -07:00
iamqizhao a95e7d874d allow space-delimited application-provided user agent 2015-07-24 17:29:42 -07:00
iamqizhao 9fc076dd02 fix a flaky end2end test due to PR#248 2015-07-24 14:31:04 -07:00
iamqizhao c33d1609af refactor a bit 2015-07-24 11:39:27 -07:00
iamqizhao 611d960757 support user-agent and allow users attach their own application user agent string 2015-07-24 11:19:08 -07:00
yangzhouhan b022c50ebe modify something 2015-07-23 18:06:59 -07:00
yangzhouhan e6a0e51ad1 modify the status map type 2015-07-23 18:01:20 -07:00
yangzhouhan a09d93d316 fix fatal message 2015-07-23 17:47:32 -07:00
yangzhouhan 89139c920f format 2015-07-23 17:41:57 -07:00
yangzhouhan cdea3603c3 add space 2015-07-23 17:40:49 -07:00
yangzhouhan 8e88badc72 modify the fatal message 2015-07-23 17:35:44 -07:00
yangzhouhan a5348d9bde change error information 2015-07-23 17:14:27 -07:00
yangzhouhan 9d4ac0cac5 fix mutex problems and merge multiple servingstatus to one single test 2015-07-23 14:45:27 -07:00
yangzhouhan dc36cdbfdd add mutex and create newHealthServer Function 2015-07-22 16:26:16 -07:00
yangzhouhan 901c3e574c remove redundent space 2015-07-22 16:06:15 -07:00
yangzhouhan 34f97a03ae minor changes 2015-07-22 16:04:53 -07:00
yangzhouhan 58e5eda3f4 update health check service and corresponding end2end test 2015-07-22 10:32:39 -07:00
yangzhouhan bd29c7cc2a change healthcheck end2end test 2015-06-16 17:11:12 -07:00
yangzhouhan 272079efe3 change the implementation of healthcheck and corresponding tests 2015-06-16 16:13:51 -07:00
yangzhouhan dbf1048b08 change the health check implementation 2015-06-16 12:16:25 -07:00
yangzhouhan 89311abb67 delet 2015-06-15 16:49:54 -07:00
yangzhouhan 39c37122c8 change back the test env parameters 2015-06-15 16:46:38 -07:00
yangzhouhan 33b85530fb add HealthCheck feature and corresponding end2end tests 2015-06-15 16:37:18 -07:00
Qi Zhao 4a6b2accdd Merge pull request #211 from iamqizhao/master
use more realistic timeout value in the test
2015-06-05 15:26:00 -07:00
iamqizhao 2768cd33c8 use more realistic timeout value in the test 2015-06-05 15:21:31 -07:00
Qi Zhao d94dcabef2 Merge pull request #200 from peter-edge/makefile
Makefile
2015-06-05 14:27:22 -07:00
iamqizhao ec20a7b857 make dialing nonblocking by default. Add a DialOption to force blocking operation. 2015-06-04 15:45:06 -07:00
iamqizhao 8df7c3fd84 i) update streamsQuota only if streamsQuota is there when the stream is created; ii) move ops of streamsQuota out of mutex of the transport (except acquire()) 2015-05-28 13:43:27 -07:00
iamqizhao 458d514e70 new streams block when the max concurrent stram limit is reached. 2015-05-27 19:03:21 -07:00
iamqizhao c3c8cfb2da fix tests 2015-05-27 16:01:18 -07:00
iamqizhao 1b5f15dda8 blocking when max concurrent stream limit is reached. 2015-05-26 18:14:05 -07:00
Peter Edge f5bae617c6 Add a Makefile to show development commands
Signed-off-by: Peter Edge <peter.edge@gmail.com>
2015-05-24 16:05:35 +02:00
iamqizhao 3617cd5ab3 revert handshaker changes 2015-05-12 17:59:20 -07:00
Peter Edge 7c025e8694 move log package references to grpclog 2015-05-09 11:43:59 +02:00
Peter Edge 101c1e1935 change log package references to grpc/log 2015-05-09 01:16:40 +02:00
iamqizhao 2cf2d0871b remove WithNetwork and add WithDialer to have more flexibility on dialing 2015-04-21 16:19:29 -07:00
iamqizhao 755059ebd3 remove some logging 2015-04-17 14:03:53 -07:00
iamqizhao 1b6e3a9200 gofmt 2015-04-17 14:00:21 -07:00
iamqizhao 3259049490 fix some typos and run gofmt 2015-04-17 13:50:18 -07:00
iamqizhao 319a8b74a7 close the ClientConn when a test case is done. 2015-03-25 18:39:17 -07:00
iamqizhao 591c1176bc modify a comment 2015-03-23 12:36:08 -07:00
iamqizhao 9c6754e004 fix a malformed error status 2015-03-23 11:47:27 -07:00
iamqizhao 51496073b8 enlarge the dial timeout in a test case because travis might not be able to finish it in time. 2015-03-13 00:50:16 -07:00
iamqizhao e10de7abd1 fix some bugs 2015-03-13 00:16:18 -07:00
iamqizhao e6b45390ca Remove a debug log 2015-03-06 17:35:54 -08:00
iamqizhao 85034d5828 fix double wrapping of rpc status 2015-03-05 18:52:06 -08:00
iamqizhao 1182c6e87c minor polish 2015-03-05 14:24:32 -08:00
iamqizhao 57c1951dc9 tightened some rpcErr loose ends and revised some tests 2015-03-05 13:56:48 -08:00
iamqizhao 351e2d0297 add more tests for dial timeout and fix some bugs 2015-03-03 19:06:44 -08:00
iamqizhao a5ca6e56d2 Support timeout for grpc.Dial 2015-03-03 17:08:39 -08:00
iamqizhao 2b993cd479 rename the convenience function to set TLS creds 2015-02-25 22:57:07 -08:00
Matt T. Proud a720ae6f48 Make error conveyance more idiomatic.
This commit applies two bulk changes to the grpc error reporting
mechanisms:

(1.) Error strings for errors that originate within grpc are prefixed
    with the package name for better clarity for where they originate
    since they could percolate up in the users call chains to the
    originator.

(2.) Errors that are, in fact, singletons have been converted from
    fmt.Errorf to errors.New and assigned as package-level variables.
    This bodes particularly well for enabling API customers to elect to
    handle these errors upon receipt via equality comparison.  This had
    been previous impossible with the original API.

Supplementarily, ``gofmt -w -s=true`` has been run on the repository to
cleanup residual defects, and it has detected and repaired a few.

TEST=Manual go test ./...
2015-02-19 13:17:17 +01:00
iamqizhao 78d3bc72bf Make the generated code return nil intead of io.EOF when everything succeeds. 2015-02-13 17:10:37 -08:00
iamqizhao fe60321708 Fix some comments 2015-02-13 16:43:51 -08:00
iamqizhao ece135da8b Use the generated code from upcoming new grpc codegen 2015-02-12 17:04:32 -08:00
iamqizhao 2b6078284c gofmt on end2end_test.go 2015-02-11 19:05:22 -08:00
iamqizhao 9c9eb38d0d Replace rpc with grpc in a error message. 2015-02-11 19:03:57 -08:00
iamqizhao 5c0599c9f0 Use interop proto to replace the one used in end2end_test.go because interop proto is better for testing corner and error cases. The code change is mostly copied/pasted from interop client & server. 2015-02-11 19:00:55 -08:00
iamqizhao fd7185b96f fix an error formatting 2015-02-09 19:16:31 -08:00
iamqizhao f61c1dbb05 rename the proto dir, prepare for porting into google3 2015-02-09 16:35:10 -08:00
David Symonds 49a2ba59b6 Fix up a couple of other imports to use the new package name. 2015-02-09 11:50:54 +11:00
David Symonds 416f68f4b3 Update import paths to use the new official location of the Go gRPC package. 2015-02-09 11:46:20 +11:00
David Symonds e71095e0ec Move source files up one level.
The top-level directory in this repository is going to be
the main "grpc" package.
2015-02-09 11:33:38 +11:00