Tags: grpc/grpc-swift
Tags
Add a merge method to Metadata (#2084) ## Motivation We want to be able to flatten `RPCError`s, and to do so we need to be able to merge the `Metadata` contained in each. ## Modifications This PR adds a helper function to merge one `Metadata` instance into another. ## Result Unblocks #2083 and also provides a potentially useful API for users. **- Note:** Because of the way `Metadata` has been implemented, we can have multiple _identical_ key-value pairs. This isn't ideal, as it's particularly feasible that we'll end up with multiple repeated identical pairs when merging two `Metadata`s. I think we should reconsider the backing data structure (using a set for example) or add a check before inserting to avoid this.
Adopt swift-testing for MethodConfig tests (#2055) Motivation: swift-testing has a number of advantages over XCTest (parameterisation, organisation, failure messages etc.), we should start using it instead of XCTest. Modifications: - Convert the MethodConfig coding tests - Fixed a couple of bugs found by additional testing Results: Fewer bugs, better tests
Additional keepalive diagnostics (#1692) Motivation: It's useful to know the state of keepalive when debugging connection issues. gRPC doesn't emit any logs around this at the moment which makes debugging difficult. Modifications: Add additional logs to the idle handler when: - the idle timeout task is scheduled, cancelled, and fires - the keepalive timer is scheduled - the scheduled close timer is fired - the connection is closed - GOAWAY frames are sent (already logs on receive) - PING frames are sent and received Result: Better visibility into connection lifecycle