You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FAB-9087] Sync conn decrement in deliverclient test
The connection number in the client_test is tracked in many tests
to ensure that no connection leak occurs, and is compared to 0.
The connection number is incremented via an implementation
of a gRPC load balancer which is passed to the connection
creation, and is decremented via the implementation of Close()
of that load balancer.
Sadly, the Close() method in the load balancer is called from a different
goroutine (the gRPC connection closes the "done channel" of the balancer)
and thus we need to:
1) Synchronize between the decrement and the read of the connNum value
2) Ensure the read of the connNum value takes place after the connNum
was decremented, while it is decremented from a different goroutine.
For that I just added a waitgroup.
Change-Id: I64f3e33c3a61c53675b3a31abf42a2be2cd4798d
Signed-off-by: yacovm <yacovm@il.ibm.com>
0 commit comments