Refactoring the load stats test to be more flake-proof (#2210)
Refactoring the load stats test to be more flake-proof (#2210)

Moving the synchronization counter checks into the functions and tracking counter values to avoid races.

This fixes the missing "test_server_->waitForCounterGe("load_reporter.requests", 2);" and futureproofs.

Risk Level: n/a (test only)
Release Notes: n/a
dnoe/envoy,craffert0/envoy,envoyproxy/envoy,jrajahalme/envoy,envoyproxy/envoy-wasm,craffert0/envoy,craffert0/envoy,envoyproxy/envoy,jrajahalme/envoy,eklitzke/envoy,envoyproxy/envoy,envoyproxy/envoy,lyft/envoy,envoyproxy/envoy,envoyproxy/envoy,sebrandon1/envoy,istio/envoy,lyft/envoy,craffert0/envoy,jrajahalme/envoy,envoyproxy/envoy,lizan/envoy,sebrandon1/envoy,lyft/envoy,sebrandon1/envoy,envoyproxy/envoy-wasm,dnoe/envoy,istio/envoy,sebrandon1/envoy,istio/envoy,sebrandon1/envoy,jrajahalme/envoy,envoyproxy/envoy-wasm,envoyproxy/envoy,eklitzke/envoy,lyft/envoy,istio/envoy,lyft/envoy,envoyproxy/envoy-wasm,eklitzke/envoy,envoyproxy/envoy,eklitzke/envoy,istio/envoy,jrajahalme/envoy,dnoe/envoy,lizan/envoy,istio/envoy,envoyproxy/envoy,envoyproxy/envoy-wasm,envoyproxy/envoy,lyft/envoy,lizan/envoy,lizan/envoy,eklitzke/envoy,lizan/envoy,dnoe/envoy,envoyproxy/envoy-wasm,envoyproxy/envoy,jrajahalme/envoy,lizan/envoy,eklitzke/envoy,envoyproxy/envoy-wasm,dnoe/envoy,istio/envoy