You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our spec package has no facility for asynchronous test completion, and consequently our net package tests do not actually have any test assertions in them.
We want to add features similar to those that exist in Pony's ponytest (though as with everything else in Mare, if we have a better design we can come up with, we shouldn't let the Pony implementation be a constraint).
The scope of this ticket is to add something to Mare's spec package which serves a similar purpose, and demonstrate it by using it in the tests for the net package.
The text was updated successfully, but these errors were encountered:
Resolves#5.
Now, if you need to test that something asynchronous happens,
you can call `@ctx.wait_for_action("my action")` to let the test
runner know that the test isn't over until the action completes.
After the asynchronous action is finished, you can mark it as such
by calling `@ctx.finished_action("my action")` to let the test
runner know that the action is complete.
You can add new actions to wait for at any time during a test,
but the names must be unique in order for them to be differentiated.
Once all awaited actions are marked as finished, the asynchronous
test example is done running.
If one or more actions don't get marked as finished in a timely manner,
an informational message will be printed every 5 seconds for all open
actions that are still being awaited.
If the whole test suite will time out after 30 seconds.
These time intervals will be able to be configured at runtime
using the constant override mechanism mentioned in this ticket:
savi-lang/savi#161
Currently, our
spec
package has no facility for asynchronous test completion, and consequently ournet
package tests do not actually have any test assertions in them.We want to add features similar to those that exist in Pony's
ponytest
(though as with everything else in Mare, if we have a better design we can come up with, we shouldn't let the Pony implementation be a constraint).Specifically I am thinking about the
expect_action
/complete_action
/fail_action
features I added a while back toponytest
, which allow setting up named sub-completions within the test, then the overall test is counted as done when all named sub-completions have finished: https://github.com/ponylang/ponyc/blob/de8c1ab3488898facf66904f18219d1fd623c7c6/packages/ponytest/test_helper.pony#L398-L436The scope of this ticket is to add something to Mare's
spec
package which serves a similar purpose, and demonstrate it by using it in the tests for thenet
package.The text was updated successfully, but these errors were encountered: