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

Finally decided to prevent tests from flaking 🤷 #495

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

ellistarn
Copy link
Contributor

@ellistarn ellistarn commented Jun 30, 2021

Issue #382, if available:

Description of changes:

  • Tests now run in ~40 seconds instead of 1:20
  • Now calls reconcilers directly to make tests more deterministic. Previous approach launched the controllers and waited, which frequently was subject to GHA noisy neighbors.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ellistarn ellistarn force-pushed the race branch 5 times, most recently from e7697bc to bf03801 Compare July 1, 2021 17:41
ExpectReconcileSucceeded(controller, provisioner)
result := []*v1.Pod{}
for _, pod := range pods {
result = append(result, ExpectPodExists(c, pod.GetName(), pod.GetNamespace()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to check if len(result) == len(pods)? In other words, can reconciliation succeed, but result in not all pods being bin-packed?

Expect(env.Client.Delete(ctx, node)).To(Succeed())
node = ExpectNodeExists(env.Client, node.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

As a side note not for this PR, but I think we should add a check here to see if it has a deletionTimestamp set, for good measure.

@ellistarn ellistarn merged commit 6f6eb2f into aws:main Jul 1, 2021
@ellistarn ellistarn deleted the race branch July 1, 2021 19:52
gfcroft pushed a commit to gfcroft/karpenter-provider-aws that referenced this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants