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 for flaky TestGameServerAllocationMetaDataPatch #726

Conversation

markmandel
Copy link
Member

Cache eventual consistency in the controller means that this test can be flaky. Implemented a polling request as allocation will work eventually.

Closes #725

@markmandel markmandel added kind/cleanup Refactoring code, fixing up documentation, etc area/tests Unit tests, e2e tests, anything to make sure things don't break labels Apr 18, 2019
@markmandel markmandel added this to the 0.10.0 milestone Apr 18, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: df1bce84-2f7b-4f6f-8625-3e32a2a01094

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/726/head:pr_726 && git checkout pr_726
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-a232f5d

assert.Equal(t, v1alpha1.GameServerAllocationAllocated, gsa.Status.State)
}
err = wait.PollImmediate(time.Second, 30*time.Second, func() (bool, error) {
gsa, err = framework.AgonesClient.AllocationV1alpha1().GameServerAllocations(defaultNs).Create(gsa.DeepCopy())
Copy link
Contributor

Choose a reason for hiding this comment

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

i believe this will cause panic if "err" is ever returned, because "gsa" will be set to nil and next iteration will use nill.DeepCopy()

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Fixed!

Cache eventual consistency in the controller means that this test can
be flaky. Implemented a polling request as allocatioon will work
eventually.

Closes googleforgames#725
@markmandel markmandel force-pushed the flaky/TestGameServerAllocationMetaDataPatch branch from a232f5d to 44f5fae Compare April 18, 2019 16:29
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3f997e56-8d5f-43d7-b467-a4059d71c29d

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/726/head:pr_726 && git checkout pr_726
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-44f5fae

@markmandel
Copy link
Member Author

Gentle bump - on a mission to de-flake the CI system, and this keeps rearing it's head.

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6db77cad-5706-46fc-ba6a-ccf01d624958

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/726/head:pr_726 && git checkout pr_726
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-0395233

@markmandel markmandel merged commit fb0acfc into googleforgames:master Apr 23, 2019
@markmandel markmandel deleted the flaky/TestGameServerAllocationMetaDataPatch branch April 23, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky Test: TestGameServerAllocationMetaDataPatch
4 participants