Commit Graph

24 Commits

Author SHA1 Message Date
hasson82 bdd707e642
scripts: add linter rule for using context.WithTimeout on tests (#7342) 2024-07-03 19:22:54 -04:00
Doug Fawley c9caa9ed53
metadata: remove String method (#7372) 2024-07-01 10:11:18 -07:00
Davanum Srinivas 6126383d85
metadata: make Stringer implementation consistent (#7355) 2024-06-27 10:59:09 -07:00
AnomalRoil 9d9a96f94b
peer and metadata: Implement the Stringer interface for Peer and Metadata (#7137) 2024-05-06 16:50:01 -04:00
Evan Jones d7ea67b9f3
metadata: Use strings.EqualFold for ValueFromIncomingContext (#6743) 2023-10-30 09:51:19 -07:00
wenxuwan 6f44ae89b1
metadata: add benchmark test for FromIncomingContext and ValueFromIncomingContext (#6117) 2023-03-15 16:19:40 -04:00
horpto 60eecd9169
metadata: add ValueFromIncomingContext to more efficiently retrieve a single value (#5596) 2022-09-07 13:14:42 -07:00
Konrad Reiche 7e35356501
metadata: add Delete method to MD (#4549) 2021-06-16 16:56:04 -07:00
Gaurav Gahlot d7a7a304ff
testing: Avoid using context.Background (#3949) 2020-11-05 09:25:17 -08:00
Garrett Gutierrez 132187f04c
Modified tests to use tlogger. (#3343)
* Modified tests to use tlogger.

* Fail on errors, with error expectations.

* Added expects and MixedCapsed grpclb_config tests

* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go

* Added ExpectErrorN()

* Removed redundant leak checks

* Fixed new test

* Made tlogger globals into tlogger methods

* ErrorsLeft -> EndTest

* Removed some redundant lines

* Fixed error in test and empty map in EndTest
2020-02-06 13:03:20 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
dfawley 90f728eaf7
Remove shadowing of built-ins (#2290) 2018-09-05 09:05:40 -07:00
Zachary Romero 291de7f0ab metadata: Add Get, Set, and Append methods to metadata.MD (#1940) 2018-04-04 09:11:19 -07:00
dfawley b96718f8f0
metadata: Fix bug where AppendToOutgoingContext could modify another context's metadata (#1930) 2018-03-19 16:23:41 -07:00
Jean de Klerk 08d626137c metadata: provide AppendToOutgoingContext interface (#1794)
- Provide AppendToOutgoingContext interface for imrproved performance
over manually creating md and joining with existing md
- Add benchmarks for old/new approaches

Fixes #1390
2018-02-12 11:10:37 -08:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
dfawley b610ffd3f8 Never encode binary metadata within the metadata map (#1188)
This change ensures consistency for the user when accessing metadata values:
they are never encoded except when sent on the wire.  Previously, they would
appear encoded to client code, but not to server code.  As such, this
represents a behavior change, but one unlikely to affect user code, as it's
unusual to inspect the metadata after setting it.
2017-04-28 10:56:58 -07:00
Michael Darakananda b32ff19331 Add context.Join instead 2016-09-23 11:12:52 +10:00
Michael Darakananda 164a9d0a3e metadata.NewContext merges old metadata
Previously metadata.NewContext(ctx, md) replaces whatever metadata in
ctx with md.
This patch merges the old metadata with md before returning the new
context.

Fixes #902.
2016-09-22 17:12:07 +10:00
Menghan Li fe4145af27 Allow comma in metadata Binary-Header value 2016-07-27 14:42:29 -07:00
iamqizhao a98f0170cf fix some print format errors 2015-12-16 11:36:52 -08:00
iamqizhao 2f524e51f1 add more tests 2015-12-15 16:13:30 -08:00
iamqizhao 87d84117a8 i) lower case metedata key names; ii) make binary encoding consistent with other impls. 2015-12-15 15:30:52 -08: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