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 test - Test_LDAP - sleep to wait for LDAP initialization #643

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

Didainius
Copy link
Collaborator

Running LDAP tests sometimes causes LDAP context not initialized which most probably occur due to LDAP is being used immediately after configuration. This PR adds a dumb sleep to see if this can iron out this problem.

START: adminorg_ldap_test.go:22: TestVCD.Test_LDAP
Setting up LDAP (IP: 10.196.34.229)
# Configuring LDAP settings for Org 'nightly_gosdk' Done
Running: test_GroupCRUD
Running: test_GroupFinderGetGenericEntity
adminorg_ldap_test.go:66:
vcd.test_GroupFinderGetGenericEntity(check)
group_test.go:147:
check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"error creating group: API Error: 500: [ 46c7f18e-f4da-408e-a597-08ef2f79eb6e ] LDAP context not initialized. Error connecting to LDAP."} ("error creating group: API Error: 500: [ 46c7f18e-f4da-408e-a597-08ef2f79eb6e ] LDAP context not initialized. Error connecting to LDAP.")

Unconfiguring LDAP
FAIL: adminorg_ldap_test.go:22: TestVCD.Test_LDAP

… errors

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius marked this pull request as ready for review January 11, 2024 05:15
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Though I don't like sleeps in general, but in this case, it's the last resort. Thanks!

@Didainius Didainius removed the request for review from dataclouder January 11, 2024 11:06
@Didainius Didainius merged commit babde82 into vmware:main Jan 11, 2024
@Didainius Didainius deleted the patch-ldap branch January 11, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants