Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Create and destroy model per test #43
Conversation
bcsaller
and others
added some commits
Nov 8, 2016
This was referenced Dec 9, 2016
| - await actionf(rule, model, objects, **action) | ||
| + try: | ||
| + await asyncio.wait_for(actionf(rule, model, objects, **action), 30) |
petevg
Dec 12, 2016
Collaborator
After we've defined success and failure better, as per #41, we should make this fail, I think, as timeouts are generally indicative of bugs.
... or maybe we have a "test core" config param, and if that is true, then timeouts lead to failure.
In any case, I'm okay with this making it into the codebase as is for now.
|
This looks good, and runs well against a local controller on my laptop. One minor nitpick: it would be nice to have a "model destroyed" message at the very end. As it was, the last message in my log was "destroying model ...", and I thought that it had hung. LGTM/+1 |
bcsaller
approved these changes
Dec 12, 2016
LGTM thanks
one minor inline
also the disable timeline issue (for now)
| + await self.add_model(context) | ||
| + await self.run_once(context, test) | ||
| + finally: | ||
| + await self.destroy_model(context) |
bcsaller
Dec 12, 2016
Contributor
We may want to honor a cmdline flag to bail here before cleaning the model so the developer can check the remaining units in more detail
johnsca
added some commits
Dec 12, 2016
|
@petevg Technically, the model is not destroyed when that API call returns, it has just sent the request off to the controller. I added a log message to indicate that it returned, at least, but do you think we should actually block until the model is gone to verify that it was successfully removed? @bcsaller I added a |
|
@johnsca Works great. Looks good. +1 (I don't think that we need to block to make sure the model is destroyed for now -- the user can clean up old models if matrix leaves a mess every once in a while.) |
johnsca commentedDec 9, 2016
This also includes @bcsaller's TUIView improvements.