NFLabs/zeppelin — pull request #23 by Leemoonsoo (2013-12-21 05:01:34+00:00)
Title: Try to fix JobManagerTest more predictable

Session status is changed like READY -> RUNNING -> FINISHED
after each status change, statusChange(job) callback is called.
and inside of statusChange callback, jobManager implement session persistence and history creation.
It means there will be a moment, after session become FINISHED status and session persisted and history created.
If test wait for status be FINISHED and looking for history then there's chance to history not exist for a certain time.

This pull request change statusChange() to beforeStatusChange() and afterStatusChange().
and all persistent, history creation is done inside of beforeStatusChange().
This change will make sure session persistence and making history done before status changed to FINISHED.