You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/06/10 18:44:56 UTC

[GitHub] [couchdb-erlfdb] kocolosk opened a new pull request #26: Ensure application environment is loaded

kocolosk opened a new pull request #26:
URL: https://github.com/apache/couchdb-erlfdb/pull/26


   erlfdb is a library application, but starting the app is still required to make the application environment variables accessible.
   Without this hack the `test_cluster_file` setting has no effect during eunit test executions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-erlfdb] kocolosk commented on a change in pull request #26: Ensure application environment is loaded

Posted by GitBox <gi...@apache.org>.
kocolosk commented on a change in pull request #26:
URL: https://github.com/apache/couchdb-erlfdb/pull/26#discussion_r650200723



##########
File path: src/erlfdb_util.erl
##########
@@ -48,6 +48,8 @@ get_test_db(Options) ->
 
 
 init_test_cluster(Options) ->
+    % Hack to ensure erlfdb app environment is loaded during unit tests
+    ok = application:ensure_started(erlfdb),

Review comment:
       That's a good point. I think if we did add a non-trivial dependency to erlfdb in the future I'd like to see this function fail so we can take the opportunity to explicitly consider whether that dependency should be started in the unit tests as well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-erlfdb] nickva commented on a change in pull request #26: Ensure application environment is loaded

Posted by GitBox <gi...@apache.org>.
nickva commented on a change in pull request #26:
URL: https://github.com/apache/couchdb-erlfdb/pull/26#discussion_r649666369



##########
File path: src/erlfdb_util.erl
##########
@@ -48,6 +48,8 @@ get_test_db(Options) ->
 
 
 init_test_cluster(Options) ->
+    % Hack to ensure erlfdb app environment is loaded during unit tests
+    ok = application:ensure_started(erlfdb),

Review comment:
       Normally it would be `{ok, _} = application:ensure_all_started(erlfdb).` but as `erldb` only depends on kernel and stdlib probably doesn't do to the extra work.

##########
File path: src/erlfdb_util.erl
##########
@@ -48,6 +48,8 @@ get_test_db(Options) ->
 
 
 init_test_cluster(Options) ->
+    % Hack to ensure erlfdb app environment is loaded during unit tests
+    ok = application:ensure_started(erlfdb),

Review comment:
       Normally it would be `{ok, _} = application:ensure_all_started(erlfdb).` but as `erldb` only depends on kernel and stdlib probably doesn't need to do the extra work checking recursive dependencies




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-erlfdb] kocolosk merged pull request #26: Ensure application environment is loaded

Posted by GitBox <gi...@apache.org>.
kocolosk merged pull request #26:
URL: https://github.com/apache/couchdb-erlfdb/pull/26


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org