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 test Test_CatalogAccessAsOrgUsers #540

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changes/v2.19.0/537-bug-fixes.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* Remove URL checks from `CreateCatalogFromSubscriptionAsync` to allow catalog creation from non-VCD entities, such as vSphere shared library [GH-537]
* Removed URL checks from `CreateCatalogFromSubscriptionAsync` to allow catalog creation from non-VCD entities, such as vSphere shared library [GH-537]
1 change: 1 addition & 0 deletions .changes/v2.19.0/540-bug-fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fixed flaky test `Test_CatalogAccessAsOrgUsers` that failed randomly for timing issues [GH-540]
11 changes: 10 additions & 1 deletion govcd/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,15 @@ func (vcd *TestVCD) Test_CatalogAccessAsOrgUsers(check *C) {
check.Assert(adminCatalog1FromOrg.AdminCatalog.HREF, Equals, adminCatalog1AsSystem.AdminCatalog.HREF)
check.Assert(adminCatalog2FromOrg.AdminCatalog.HREF, Equals, adminCatalog1AsSystem.AdminCatalog.HREF)
check.Assert(catalog2FromOrg.Catalog.HREF, Equals, catalog1AsSystem.Catalog.HREF)
err = adminCatalog1AsSystem.Delete(true, true)
timeout = 30 * time.Second
startTime = time.Now()
for time.Since(startTime) < timeout {
err = adminCatalog1AsSystem.Delete(true, true)
if err == nil {
fmt.Printf("shared catalog deleted in %s\n", time.Since(startTime))
break
}
time.Sleep(200 * time.Millisecond)
}
check.Assert(err, IsNil)
}