SollmoStudio / beyond

Beyond: The Scalable Game Server Framework
http://www.beyondframework.com
Apache License 2.0
25 stars 9 forks source link

Add a 'wait' helper for plugin tests. #187

Closed hatashiro closed 9 years ago

hatashiro commented 9 years ago

In plugin tests, there're many chances to test modules with ScriptableFuture results. Until now, we've used async tests with it.will, but it's been rapidly getting verbose and complicated. While adding tests for ScriptableCollection, I finally found that wait was really needed, at least for tests.

I once thought to add it as a method of ScriptableFuture, but I think it's better not to enable user to use wait, as they could use it in the production level which is a bad practice. Thus I added it as a test-helper module.

The first commit is to add the helper module, and the other is to modify the original tests to use the helper.

hatashiro commented 9 years ago

@kimchoco @sgkim126, please review this.

sgkim126 commented 9 years ago

LGTM