Commit 4dfd4ec
authored
test(policy): address timeouts and flakiness (#14773)
Policy tests are very flaky. Currently one of the main culprits is that service account creation sometimes isn't caught as an event by the watcher, blocking `await_service_account` until it times out after 60s. We already have in place up to 3 retries when calling `cargo nextest`, but these tests are sequential and the 60s timeouts start accumulating until we reach the CI job timeout at 20min.
This change first lowers the service account creation timeout down to 15s, understanding that if the watcher catches that event it will do pretty quickly or else block indefinitely. So better to fail faster and trigger the test retry ASAP.
With this change, `test-policy (v1.34, linkerd, experimental)` is finally passing, taking 17m due to the large number of retries:
```
Summary [ 779.409s] 151 tests run: 151 passed (15 flaky), 0 skipped
FLAKY 2/4 [ 0.069s] linkerd-policy-test::admit_network_authentication rejects_invalid_cidr
FLAKY 3/4 [ 15.019s] linkerd-policy-test::e2e_audit ns_audit
FLAKY 2/4 [ 10.964s] linkerd-policy-test::e2e_authorization_policy targets_route
FLAKY 3/4 [ 3.830s] linkerd-policy-test::e2e_egress_network default_traffic_policy_http_allow
FLAKY 2/4 [ 37.004s] linkerd-policy-test::e2e_http_local_ratelimit_policy ratelimit_total
FLAKY 2/4 [ 7.947s] linkerd-policy-test::e2e_server_authorization network
FLAKY 2/4 [ 0.142s] linkerd-policy-test::inbound_http_route_status inbound_accepted_parent
FLAKY 2/4 [ 0.167s] linkerd-policy-test::inbound_http_route_status inbound_multiple_parents
FLAKY 2/4 [ 1.681s] linkerd-policy-test::outbound_api multiple_routes
FLAKY 2/4 [ 1.013s] linkerd-policy-test::outbound_api routes_without_backends
FLAKY 3/4 [ 1.153s] linkerd-policy-test::outbound_api service_with_routes_with_cross_namespace_backend
FLAKY 2/4 [ 0.282s] linkerd-policy-test::outbound_api_failure_accrual consecutive_failure_accrual
FLAKY 3/4 [ 0.290s] linkerd-policy-test::outbound_api_failure_accrual default_failure_accrual
FLAKY 2/4 [ 0.354s] linkerd-policy-test::outbound_api_http http_route_gateway_timeouts
FLAKY 2/4 [ 0.740s] linkerd-policy-test::outbound_api_http http_route_retries_and_timeouts
```
After having measured this, we also added a watcher for the namespace, vastly reducing flakiness:
```
Summary [ 517.330s] 151 tests run: 151 passed (2 flaky), 0 skipped
FLAKY 2/4 [ 0.941s] linkerd-policy-test::outbound_api routes_without_backends
FLAKY 2/4 [ 0.459s] linkerd-policy-test::outbound_api_tcp multiple_tcp_routes
```
Finally, the jaeger chart version has to be pinned to an earlier one as the latest one is presenting some breaking changes that are making the tracing test fail.1 parent 8394331 commit 4dfd4ec
File tree
2 files changed
+41
-17
lines changed- policy-test/src
- test/integration/tracing/tracing
2 files changed
+41
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
758 | 765 | | |
759 | 766 | | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | 767 | | |
768 | | - | |
| 768 | + | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
| 771 | + | |
| 772 | + | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
776 | | - | |
777 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
778 | 778 | | |
779 | | - | |
| 779 | + | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
784 | 808 | | |
785 | 809 | | |
786 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
0 commit comments