envoyproxy / envoyproxy/envoy

integration tests should use simulated time

Abierto
#4,160 12 comentarios 0 reacciones 0 asignados Ver en GitHub
help wanted tech debt
Lenguaje dominante
C++
Estrellas
28.9k
Forks
5.6k
Merge medio
1 d 22 h
PR fusionados (30 d)
430

Descripción

*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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.