Skip to content
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

Fix flaky TestController_RotateCertificates unit test #4241

Conversation

antoninbas
Copy link
Contributor

The difference in CSR CreationTimestamp can be lower than 7s because the resolution of the certificate's NotAfter field is at the second level, which means the provided expiration time will be truncated.

Fixes #4224

Signed-off-by: Antonin Bas [email protected]

The difference in CSR CreationTimestamp can be lower than 7s because the
resolution of the certificate's NotAfter field is at the second level,
which means the provided expiration time will be truncated.

Fixes antrea-io#4224

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas requested review from xliuxu and tnqn September 20, 2022 23:35
@antoninbas antoninbas added area/test Issues or PRs related to unit and integration tests. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. labels Sep 20, 2022
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #4241 (80547bc) into main (4caa8c1) will decrease coverage by 4.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4241      +/-   ##
==========================================
- Coverage   64.29%   60.26%   -4.03%     
==========================================
  Files         361      385      +24     
  Lines       52203    54471    +2268     
==========================================
- Hits        33563    32828     -735     
- Misses      16186    19176    +2990     
- Partials     2454     2467      +13     
Flag Coverage Δ
integration-tests 34.83% <ø> (+<0.01%) ⬆️
kind-e2e-tests 42.41% <ø> (-6.16%) ⬇️
unit-tests 43.82% <ø> (-1.19%) ⬇️
Impacted Files Coverage Δ
pkg/agent/proxy/endpointslicecache.go 0.00% <0.00%> (-83.60%) ⬇️
...g/agent/controller/serviceexternalip/controller.go 35.83% <0.00%> (-43.35%) ⬇️
...nt/apiserver/handlers/serviceexternalip/handler.go 29.62% <0.00%> (-22.23%) ⬇️
pkg/agent/util/net.go 33.33% <0.00%> (-20.23%) ⬇️
pkg/agent/route/route_linux.go 35.48% <0.00%> (-17.96%) ⬇️
pkg/agent/ipassigner/responder/arp_responder.go 55.29% <0.00%> (-17.65%) ⬇️
pkg/controller/externalnode/controller.go 0.00% <0.00%> (-17.19%) ⬇️
pkg/agent/proxy/topology.go 66.66% <0.00%> (-15.16%) ⬇️
pkg/agent/cniserver/ipam/ipam_service.go 76.40% <0.00%> (-12.36%) ⬇️
pkg/agent/controller/trafficcontrol/controller.go 71.55% <0.00%> (-11.95%) ⬇️
... and 74 more

@tnqn
Copy link
Member

tnqn commented Sep 21, 2022

/skip-all

1 similar comment
@XinShuYang
Copy link
Contributor

/skip-all

@antoninbas antoninbas merged commit b36a884 into antrea-io:main Sep 21, 2022
@antoninbas antoninbas deleted the fix-flaky-TestController_RotateCertificates branch September 21, 2022 15:58
heanlan pushed a commit to heanlan/antrea that referenced this pull request Mar 29, 2023
The difference in CSR CreationTimestamp can be lower than 7s because the
resolution of the certificate's NotAfter field is at the second level,
which means the provided expiration time will be truncated.

Fixes antrea-io#4224

Signed-off-by: Antonin Bas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Issues or PRs related to unit and integration tests. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky test] TestController_RotateCertificates
4 participants