-
Notifications
You must be signed in to change notification settings - Fork 782
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
Flaky ENT Tests fix #1886
Flaky ENT Tests fix #1886
Conversation
kkavish
commented
Feb 23, 2024
- fixing flaky tests, yay!
- test using CI and local runs, you need to have an ENT build in path and a valid license set as environment variable.
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.
Left minor comments
@@ -299,17 +299,17 @@ func TestKVListQuery_Fetch(t *testing.T) { | |||
{ | |||
Path: "test-kv-list/prefix/foo", | |||
Key: "foo", | |||
Value: fmt.Sprintf("bar-%s-%s", tenancy.Partition, tenancy.Namespace), | |||
Value: "bar-default-default", |
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.
Is this change needed?
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.
yes, segregated the default cases for CE.
but the resource creation is common and uses tenancy name.
Address: testConsul.Config.Bind, | ||
Datacenter: "dc1", | ||
TaggedAddresses: map[string]string{ | ||
//"lan": "127.0.0.1", |
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.
Since this is commented. I feel that we should remove it.
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.
we could, but I want to keep it to investigate why it's not working intermittently.
@@ -241,6 +236,7 @@ func (c *ClientSet) createConsulTestResources() error { | |||
if err := testClients.createConsulPeerings(tenancy); err != nil { | |||
return err | |||
} | |||
time.Sleep(200 * time.Millisecond) |
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.
Is this needed? The creation of resources should be in sync right?
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 is to make sure that consul reaches a state of entropy.
the falky tests were due to wrong way of creating resource but the consul servers were not reaching a state of entropy and thus were not evicting the resources sometimes.
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.
If you changed all the registrations so they're not to the local agent but to a fake node then agent entropy won't matter so there should be no need for this sleep
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.
noted, I had it in place so that if someone accidentally writes to the local agent, the tests would keep on failing, without getting successful intermittently.
What do you suggest?