google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.53k stars 1.28k forks source link

Use fakeclock in all tests #5940

Open ghananigans opened 3 years ago

ghananigans commented 3 years ago

Related #5939

The fake clock provides a mechanism to manually advance time independent of the wall clock time for test purposes. We should use this throughout the netstack's unit tests to reduce flakes and reduce test run time

Examples of some long running (and sometimes flaky) tests are the NDP and TCP tests

github-actions[bot] commented 11 months ago

A friendly reminder that this issue had no activity for 120 days.

github-actions[bot] commented 8 months ago

This issue has been closed due to lack of activity.

github-actions[bot] commented 8 months ago

There are TODOs still referencing this issue:

  1. pkg/tcpip/transport/tcp/test/e2e/dual_stack_test.go:563: Use fake clock in tests.
  2. pkg/tcpip/transport/tcp/test/e2e/forwarder_test.go:217: Use fake clock in tests.
  3. pkg/tcpip/transport/tcp/test/e2e/sack_scoreboard_test.go:258: Use fake clock in tests.
  4. pkg/tcpip/transport/tcp/test/e2e/tcp_noracedetector_test.go:565: Use fake clock in tests.
  5. pkg/tcpip/transport/tcp/test/e2e/tcp_rack_test.go:1075: Use fake clock in tests.
  6. pkg/tcpip/transport/tcp/test/e2e/tcp_sack_test.go:955: Use fake clock in tests.
  7. pkg/tcpip/transport/tcp/test/e2e/tcp_test.go:9427: Use fake clock in tests.
  8. pkg/tcpip/transport/tcp/test/e2e/tcp_timestamp_test.go:322: Use fake clock in tests.

Search TODO

github-actions[bot] commented 4 months ago

A friendly reminder that this issue had no activity for 120 days.