envoyproxy / envoyproxy/envoy

integration tests should use simulated time

オープン
#4,160 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る
help wanted tech debt
主要言語
C++
スター
28.9k
フォーク
5.6k
平均マージ
1日 22時間
マージ済み PR(30日)
430

説明

*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_](https://github.com/envoyproxy/envoy/blob/a3c55bf7bc514202b203cc797b504212da797a47/source/common/common/utility.h#L117)

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。