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

Flaky TestNewKubernetesSource/Successful unit test #275

Closed
lsviben opened this issue Sep 7, 2023 · 1 comment · Fixed by #454
Closed

Flaky TestNewKubernetesSource/Successful unit test #275

lsviben opened this issue Sep 7, 2023 · 1 comment · Fixed by #454
Labels
bug Something isn't working is:triaged tests v2
Milestone

Comments

@lsviben
Copy link
Contributor

lsviben commented Sep 7, 2023

What happened?

Seems that this test is flaky, seen it fail mutiple times over different PRs

=== RUN   TestNewKubernetesSource/Successful
    kubernetes_test.go:122: 
        Next(...): -want, +got:
          []migration.UnstructuredWithMetadata{
        - 	{
        - 		Object: unstructured.Unstructured{
        - 			Object: map[string]any{
        - 				"apiVersion": string("ec2.aws.crossplane.io/v1beta1"),
        - 				"kind":       string("VPC"),
        - 				"metadata":   map[string]any{...},
        - 				"spec":       map[string]any{...},
        - 			},
        - 		},
        - 		Metadata: migration.Metadata{Category: s"managed"},
        - 	},
          	{Object: {Object: {"apiVersion": string("azure.crossplane.io/v1beta1"), "kind": string("ResourceGroup"), "metadata": map[string]any{"name": string("example-resources")}, "spec": map[string]any{"forProvider": map[string]any{"location": string("West Europe")}}}}, Metadata: {Category: s"managed"}},
        + 	{
        + 		Object: unstructured.Unstructured{
        + 			Object: map[string]any{
        + 				"apiVersion": string("ec2.aws.crossplane.io/v1beta1"),
        + 				"kind":       string("VPC"),
        + 				"metadata":   map[string]any{...},
        + 				"spec":       map[string]any{...},
        + 			},
        + 		},
        + 		Metadata: migration.Metadata{Category: s"managed"},
        + 	},
          }
--- FAIL: TestNewKubernetesSource (0.00s)
    --- FAIL: TestNewKubernetesSource/Successful (0.00s)

How can we reproduce it?

I assume just running unit tests multiple times should trigger it. I see if fairly often on PRs

@lsviben lsviben added bug Something isn't working needs:triage labels Sep 7, 2023
@jeanduplessis
Copy link
Collaborator

I can confirm this flaky behavior by simply triggering the unit tests multiple times: repeat 10 make test | grep TestNewKubernetesSource

CleanShot 2023-10-10 at 14 39 35@2x

CleanShot 2023-10-10 at 14 41 47@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is:triaged tests v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants