-
Notifications
You must be signed in to change notification settings - Fork 545
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
Tests for Runaway Control Loops #361
Conversation
test/e2e/csv_e2e_test.go
Outdated
@@ -116,6 +116,12 @@ var csvReplacingChecker = func(csv *v1alpha1.ClusterServiceVersion) bool { | |||
return csv.Status.Phase == v1alpha1.CSVPhaseReplacing || csv.Status.Phase == v1alpha1.CSVPhaseDeleting | |||
} | |||
|
|||
var csvResourceVersionCheckerFor = func(csv *v1alpha1.ClusterServiceVersion) csvConditionChecker { | |||
return func(fetchedCSV *v1alpha1.ClusterServiceVersion) bool { | |||
return csv.GetResourceVersion() == fetchedCSV.GetResourceVersion() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ecordell what do you think of this approach to catching regressions like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work if we're careful to use it correctly. Calling it twice in a row probably won't find the issues, but calling it once, waiting for a period of time that we don't expect changes to have occurred, and then calling it again will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we hit a known state that we don't expect to change, we could just go ahead and defer
a check for the resourceVersion.
If that's not enough, we could keep a registry of resourceVersionChecks for the entire testsuite, and then check them as a final test.
3e008a2
to
682d2ab
Compare
@ecordell The last test run passed, I just removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tests for Runaway Control Loops
Tests for Runaway Control Loops
Description
Adds checks in the e2e tests to ensure that the Operators are not rapidly processing OLM custom resources.
Addresses https://jira.coreos.com/browse/ALM-581