Skip to content

Commit

Permalink
Make sure all necessary apps are started
Browse files Browse the repository at this point in the history
My guess is this test was previously depending on the side effects of
another test to start these applications.  In a perfect world the test
would setup/teardown the apps before/after the test but I'm just
trying to get the tests to run here.
  • Loading branch information
rzezeski committed May 28, 2012
1 parent 6170114 commit f9b142e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions test/eqc_routes.erl
Expand Up @@ -28,13 +28,7 @@ prop_routes () ->
collect(Auth,
begin
setup(Auth),

%% start application dependencies
riak_core_util:start_app_deps(riak_core),
riak_core_util:start_app_deps(riak_control),

%% can now start riak control
application:start(riak_control),
start_apps(),

%% ensure riak_control is up and running
riak_core:wait_for_application(riak_control),
Expand All @@ -56,7 +50,6 @@ prop_routes () ->
end))
end)).


%% ---------------------------------------------------------------------------
%% statem behavior

Expand Down Expand Up @@ -240,4 +233,18 @@ auth_user (_) -> "".
qs ([{K,V}|QS]) -> f("~s=~w&~s", [K,V,qs(QS)]);
qs ([]) -> "".

%% TODO Should probably write stop_apps but need to determine all apps
%% started by start_app_deps.
start_apps() ->
application:start(compiler),
application:start(syntax_tools),
application:start(mochiweb),

%% start application dependencies
riak_core_util:start_app_deps(riak_core),
riak_core_util:start_app_deps(riak_control),

%% can now start riak control
application:start(riak_control).

-endif. % EQC

0 comments on commit f9b142e

Please sign in to comment.