cloudfoundry-attic / wats

Windows Acceptance Tests
Apache License 2.0
10 stars 10 forks source link

WATs should wait for `update-quota` command to finish #14

Closed jvshahid closed 7 years ago

jvshahid commented 7 years ago

Looks like we don't wait for the the update-quota command to finish here which sometimes will cause cf logout to run in parallel and cause the update-quota command to fail with error:

[2017-07-19 18:48:30.42 (UTC)]> cf update-quota WATS-1-QUOTA-01536ba1-05d7-4e52-6 -m 99999G 

[2017-07-19 18:48:30.42 (UTC)]> cf logout 
Logging out...
OK
FAILED
Not logged in. Use 'cf login' to log in.

This has caused test failures in this build

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/149184835

The labels on this github issue will be updated when the story is started.

crawsible commented 7 years ago

Thanks @jvshahid, scheduling this.

sunjayBhatia commented 7 years ago

@jvshahid I think we just need to change the update-quota line to

        Eventually(cf.Cf("update-quota", quota.Entity.Name, "-m", memoryLimit), DEFAULT_TIMEOUT).Should(gexec.Exit(0))

so that we actually wait for the command to exit before the AsUser logs us out otherwise the gexec.Session returned by cf.Cf() is just left to run as it pleases without anything waiting for it to finish

crawsible commented 7 years ago

@sunjayBhatia maybe we should follow the pattern here and use cf.Cf(...).Wait(<timeout>) instead?

crawsible commented 7 years ago

@jvshahid We made this change on master.