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

Fixes hang on timeout, tweak cron tests #248

Merged
merged 1 commit into from Sep 6, 2022

Conversation

kurt-google
Copy link
Collaborator

Ginkgo function panic on failure so waitgroup.Done() never happens and
the entire test hangs. Instead we should let GinkgoRecover recover the
function and then call waitgroup.Done() from the caller that recovered.
Now the test should resolve as pass/fail within 30s.

Also tweak cronanything to accept subminute schedules and clamp down
timings. Running for 100 runs new run stats are:
//oracle/controllers/backupschedulecontroller/functest:functest_test
PASSED in 28.5s
Stats over 100 runs: max = 28.5s, min = 23.1s, avg = 25.3s, dev = 1.0s

Change-Id: I7468c99199a4a93a359d2b2f0afa2d8c00eb3ba8

Ginkgo function panic on failure so waitgroup.Done() never happens and
the entire test hangs. Instead we should let GinkgoRecover recover the
function and then call waitgroup.Done() from the caller that recovered.
Now the test should resolve as pass/fail within 30s.

Also tweak cronanything to accept subminute schedules and clamp down
timings. Running for 100 runs new run stats are:
//oracle/controllers/backupschedulecontroller/functest:functest_test
PASSED in 28.5s
  Stats over 100 runs: max = 28.5s, min = 23.1s, avg = 25.3s, dev = 1.0s

Change-Id: I7468c99199a4a93a359d2b2f0afa2d8c00eb3ba8
Copy link
Collaborator

@akinfermo akinfermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akinfermo, kurt-google

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kurt-google
Copy link
Collaborator Author

/retest

@kurt-google
Copy link
Collaborator Author

kurt-google commented Sep 6, 2022

This failure looks due to us using an old kubebuilder tools for our envtest setup (from k8s 1.19, we have updated most everything else to 1.24). This is likely the cause of some other issues as well. I will wrap the update for this into the next batch of fixes.

@kurt-google kurt-google merged commit c7bb84a into GoogleCloudPlatform:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants