Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make boss.test.config optional

  • Loading branch information...
commit 7e22a37dbb6e8ccabcde3bd612235593905d20ec 1 parent 1afb90f
@evanmiller evanmiller authored
Showing with 8 additions and 2 deletions.
  1. +4 −1 skel/boss.config
  2. +4 −1 skel/priv/rebar/boss_plugin.erl
View
5 skel/boss.config
@@ -6,6 +6,9 @@
%%% details, please visit
%%% https://github.com/evanmiller/ChicagoBoss/wiki/Configuration
+%%% When running tests, you may want to create a separate configuration file
+%%% "boss.test.config" which, if present, will be read instead of boss.config.
+
%% SYSTEM CONFIGURATION
%% vm_cookie - Erlang cookie, must be the same for all nodes in the
@@ -14,7 +17,7 @@
%% vm_name - Node name to use in production. Must be unique for all
%% nodes in the cluster. Defaults to <application_name>@<host_name>.
%% vm_max_processes - The limit of processes that the VM is allowed to
-%% spawn. Defaults to 134217727 (the highest possible value).
+%% spawn. Defaults to 32768 (the usual system default).
[{boss, [
{path, "{{src}}"},
View
5 skel/priv/rebar/boss_plugin.erl
@@ -140,7 +140,10 @@ boss_config(Command) ->
false ->
?BOSS_CONFIG_FILE;
true ->
- ?BOSS_TEST_CONFIG_FILE
+ case file:read_file_info(?BOSS_TEST_CONFIG_FILE) of
+ {ok, _} -> ?BOSS_TEST_CONFIG_FILE;
+ _ -> ?BOSS_CONFIG_FILE
+ end
end,
case file:consult(BossConfFile) of
{error,enoent} ->
Please sign in to comment.
Something went wrong with that request. Please try again.