boundary
boundary copied to clipboard
Just a test draft PR
Testing how grpc client conn and the manual resolver behave when adding/changing/deleting addresses and when servers go down.
Here is an example log from the included test file. === RUN TestManualResolver grpcbehavior_test.go:86: initial state setup grpcbehavior_test.go:89: First state is CONNECTING grpcbehavior_test.go:224: Accept returned for 1 grpcbehavior_test.go:123: State is ready, now connecting another address grpcbehavior_test.go:125: Added another address grpcbehavior_test.go:224: Accept returned for 2 grpcbehavior_test.go:130: now connecting bad address grpcbehavior_test.go:132: Added a bad address grpcbehavior_test.go:137: now disconnecting original address grpcbehavior_test.go:139: disconnected original address grpcbehavior_test.go:236: Close called for 1 grpcbehavior_test.go:236: Close called for 1 grpcbehavior_test.go:144: adding 3rd address grpcbehavior_test.go:146: added 3rd address grpcbehavior_test.go:224: Accept returned for 3 grpcbehavior_test.go:151: leaving just the bad address grpcbehavior_test.go:117: New state set to TRANSIENT_FAILURE grpcbehavior_test.go:153: left just the bad address grpcbehavior_test.go:236: Close called for 3 grpcbehavior_test.go:236: Close called for 3 grpcbehavior_test.go:236: Close called for 2 grpcbehavior_test.go:236: Close called for 2 grpcbehavior_test.go:158: set just the second address grpcbehavior_test.go:117: New state set to IDLE grpcbehavior_test.go:160: set just the second address grpcbehavior_test.go:117: New state set to CONNECTING grpcbehavior_test.go:224: Accept returned for 2 grpcbehavior_test.go:117: New state set to READY grpcbehavior_test.go:162: swap to just the 3rd address grpcbehavior_test.go:117: New state set to IDLE grpcbehavior_test.go:164: swapped to 3rd address grpcbehavior_test.go:117: New state set to CONNECTING grpcbehavior_test.go:224: Accept returned for 3 grpcbehavior_test.go:236: Close called for 2 grpcbehavior_test.go:236: Close called for 2 grpcbehavior_test.go:117: New state set to READY grpcbehavior_test.go:169: closing 2nd address's server grpcbehavior_test.go:171: closed 2nd address's server grpcbehavior_test.go:176: adding 4th-final addresses grpcbehavior_test.go:182: added 4th-final addresses grpcbehavior_test.go:224: Accept returned for 9 grpcbehavior_test.go:224: Accept returned for 10 grpcbehavior_test.go:224: Accept returned for 8 grpcbehavior_test.go:224: Accept returned for 4 grpcbehavior_test.go:224: Accept returned for 7 grpcbehavior_test.go:224: Accept returned for 6 grpcbehavior_test.go:224: Accept returned for 5 grpcbehavior_test.go:188: Done, shutting down grpcbehavior_test.go:119: No longer tracking state changes grpcbehavior_test.go:236: Close called for 3 grpcbehavior_test.go:236: Close called for 3 grpcbehavior_test.go:236: Close called for 4 grpcbehavior_test.go:236: Close called for 4 grpcbehavior_test.go:236: Close called for 5 grpcbehavior_test.go:236: Close called for 5 grpcbehavior_test.go:236: Close called for 6 grpcbehavior_test.go:236: Close called for 6 grpcbehavior_test.go:236: Close called for 7 grpcbehavior_test.go:236: Close called for 7 grpcbehavior_test.go:236: Close called for 8 grpcbehavior_test.go:236: Close called for 8 grpcbehavior_test.go:236: Close called for 9 grpcbehavior_test.go:236: Close called for 9 grpcbehavior_test.go:236: Close called for 10 grpcbehavior_test.go:236: Close called for 10 --- PASS: TestManualResolver (27.02s)