You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): optimize test execution time by reducing unnecessary waits (#6369)
* test(e2e): optimize test execution time by reducing unnecessary waits
- Reduce global poll interval from 2s to 1s for faster resource readiness detection
- Fix WaitUntil ignoring its interval parameter (was hardcoded to 2s)
- Reduce disaster test sleep from 60s to 5s (process STOP/CONT simulation)
- Reduce nc timeout from 5s to 2s in NAT policy external access checks
- Add PeriodSeconds:1 and FailureThreshold:1 to VPC pod probe tests
- Skip redundant StatefulSet IPPool iterations (replicas 1,2) and test only replicas=3
- Parallelize NAT policy ipset/iptables checks across nodes
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(e2e): unify poll interval to 1s and reduce pod termination grace period
Replace all 150 hardcoded 2*time.Second poll intervals with the framework
poll constant (1s) or time.Second for files outside the framework package.
Also reduce TerminationGracePeriodSeconds from 3 to 1 for pods and add it
to StatefulSets to speed up teardown.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
* test(e2e): fix deployment termination grace period and remaining poll intervals
- Add TerminationGracePeriodSeconds=1 to MakeDeployment, consistent with
MakePod and MakeStatefulSet. Without this, deployment pods use the
default 30s grace period, slowing down all deployment-based tests.
- Reduce checkIPSetOnNode poll interval from 3s to 1s to match the
unified poll standard.
- Reduce waitForInterfaceState poll interval from 5s to 1s to match the
unified poll standard.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
* test(e2e): parallelize AfterEach cleanup to reduce test execution time
Restructure AfterEach blocks in 8 test files to delete resources in
parallel within the same dependency level, then wait for all to
disappear before proceeding to the next level. This reduces cleanup
time from N × single-resource-time to max(single-resource-time) per
level.
Add PodClient.DeleteGracefully() method that initiates pod deletion
with a 1-second grace period without blocking, enabling parallel
pod cleanup alongside other resource types.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
* test(e2e): fix node update conflict in nodeSelector underlay test
Use retry.RetryOnConflict to wrap node label update operations to handle
409 Conflict errors caused by stale resourceVersion when concurrent
controllers modify the node between Get and Update.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
* test(e2e): fix deployment ippool test race condition with terminating pods
GetPodsForDeployment() does not filter out pods with DeletionTimestamp,
so when pods are deleted and recreated within the same ReplicaSet, both
old (terminating) and new (running) pods are returned, causing
"expect 3 but got 6" failures.
Fix by using DeleteGracefully (1s grace period) and explicitly waiting
for old pods to be fully removed before checking new pod count.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
* test(e2e): fix Restart() 409 conflict by retrying with fresh resourceVersion
Wrap Deployment and DaemonSet Restart() with retry.RetryOnConflict to
handle 409 Conflict errors caused by concurrent controller status updates
between Get and Update. Each retry fetches the latest object to ensure
a current resourceVersion.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments