envoyproxy/envoy

integration tests should use simulated time

开放

#4,160 创建于 2018年8月15日

 (12 条评论) (0 个反应) (0 位负责人)C++ (5,373 个派生)batch import
help wantedtech debt

仓库指标

星标
 (27,997 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Description:

A slow testing environment causes test failures and flakes, such as the one described in https://github.com/envoyproxy/envoy/issues/4135. It also makes it hard to run tests under a debugger, which, in addition to helping to debug tests, is a strategy I use sometimes to learn code.

My feeling is that the root of this problem (and others) is singleton patterns like: ProdMonotonicTimeSource::instance_

In the past I've used strategies where these get passed downward as the world gets constructed, so singletons are never referenced in code that needs to be tested (or even exist, usually).

My hope is that injecting MonotonicTime refs into key classes in the system will eliminate the need to reference singletons deeply.

贡献者指南