New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unittests: Fixes unit tests for Windows (part 6) #114508
Conversation
@claudiubelu: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind failing-test |
/retest |
/triage accepted |
a8f9f49
to
9787430
Compare
07e8b0b
to
ca4377a
Compare
d2087eb
to
57d0570
Compare
/test pull-ci-kubernetes-unit-windows |
/test pull-kubernetes-e2e-kind |
Note: The Windows unit tests ran on this PR [1], and the following tests that are enabled / touched in this PR passed:
Note: this PR also fixes the only remaining consistently failing (and not failing) unit tests on Windows ( [1] https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/114508/pull-ci-kubernetes-unit-windows/1618920132325675008 |
50d2dea
to
5d6ef3b
Compare
1c32e6b
to
3561955
Compare
Currently, there are some unit tests that are failing on Windows due to various reasons: - On Windows, consecutive time.Now() calls may return the same timestamp, which would cause the TestFreeSpaceRemoveByLeastRecentlyUsed test to flake. - tests in kuberuntime_container_windows_test.go fail on Nodes that have fewer than 3 CPUs, expecting the CPU max set to be more than 100% of available CPUs, which is not possible. - calls in summary_windows_test.go are missing context. - filterTerminatedContainerInfoAndAssembleByPodCgroupKey will filter and group container information by the Pod cgroup key, if it exists. However, we don't have cgroups on Windows, thus we can't make the same assertions.
3561955
to
ec753fc
Compare
/lgtm |
LGTM label has been added. Git tree hash: d302f9c60585712e8048f0242b51752a0655e7dc
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: claudiubelu, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@claudiubelu: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/test pull-kubernetes-unit |
What type of PR is this?
/sig testing
/sig windows
/kind failing-tests
/priority important-soon
/milestone v1.27
What this PR does / why we need it:
Currently, there are some unit tests that are failing on Windows due to various reasons:
time.Now()
calls may return the same timestamp, which would cause theTestFreeSpaceRemoveByLeastRecentlyUsed
test to flake.kuberuntime_container_windows_test.go
fail on Nodes that have fewer than 3 CPUs, expecting the CPU max set to be more than 100% of available CPUs, which is not possible.summary_windows_test.go
are missing context.filterTerminatedContainerInfoAndAssembleByPodCgroupKey
will filter and group container information by the Pod cgroup key, if it exists. However, we don't have cgroups on Windows, thus we can't make the same assertions.Which issue(s) this PR fixes:
Related: #51540
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: