couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r674116 - in /incubator/couchdb/branches/runtimeconfig: share/www/script/ src/couchdb/ src/mochiweb/ test/
Date Fri, 04 Jul 2008 20:31:11 GMT
Author: jan
Date: Fri Jul  4 13:31:10 2008
New Revision: 674116

URL: http://svn.apache.org/viewvc?rev=674116&view=rev
Log:
have modules bail out if a required config value is not available for some reason.

Modified:
    incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_log.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_query_servers.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_util.erl
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_view.erl
    incubator/couchdb/branches/runtimeconfig/src/mochiweb/Makefile.am
    incubator/couchdb/branches/runtimeconfig/test/couch_config_test.erl

Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] Fri Jul
 4 13:31:10 2008
@@ -1253,7 +1253,7 @@
     T(res.ok);
     T(res.value == "1024");
 
-    xhr = CouchDB.request("GET", "/_config/MaximumDocumentSize");
+    xhr = CouchDB.request("GET", "/_config/CouchDB/MaximumDocumentSize");
     T(xhr.status == 200);
     var res = JSON.parse(xhr.responseText);
     T(res.ok);

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_config.erl Fri Jul  4 13:31:10
2008
@@ -56,8 +56,8 @@
 %%      local ets table and writes it to the storage ini file.
 store(Key, Value) -> gen_server:call(?MODULE, {store, [{Key, Value}]}).
 
-%% @spec lookup(Key::any()) -> Value::any() | null
-%% @doc Returns the value that is stored under key::any() or null::atom() if no
+%% @spec lookup(Key::any()) -> Value::any() | undefined
+%% @doc Returns the value that is stored under key::any() or undefined::atom() if no
 %%      such Key exists.
 lookup(Key) -> gen_server:call(?MODULE, {lookup, Key}).
 
@@ -67,8 +67,8 @@
 lookup(Key, Default) -> gen_server:call(?MODULE, {lookup, Key, Default}).
 
 %% @spec lookup_and_register(Key::any(), CallbackFunction::function()) ->
-%%         Value::any() | null
-%% @doc Returns the value that is stored under Key::any() or null::atom() if no
+%%         Value::any() | undefined
+%% @doc Returns the value that is stored under Key::any() or undefined::atom() if no
 %%      such Key exists. Additionally, this functions registers 
 %%      CallbackFunction::function() to be called if the value of Key::any()
 %%      is changed at a later point.
@@ -86,9 +86,9 @@
 lookup_and_register(Key, Default, CallbackFunction) ->
     gen_server:call(?MODULE, {lookup_and_register, Key, Default, CallbackFunction}).
 
-%% @spec lookup_match(Key::any()) -> Value::any() | null:atom()
+%% @spec lookup_match(Key::any()) -> Value::any() | undefined:atom()
 %% @doc Lets you look for a Key's Value specifying a pattern that gets passed 
-%%      to ets::match(). Returns null::atom() if no Key is found.
+%%      to ets::match(). Returns undefined::atom() if no Key is found.
 lookup_match(Key) -> gen_server:call(?MODULE, {lookup_match, Key}).
 
 %% @spec lookup_match(Key::any(), Default::any()) -> Value::any() | Default
@@ -97,9 +97,9 @@
 lookup_match(Key, Default) -> gen_server:call(?MODULE, {lookup_match, Key, Default}).
 
 %% @spec lookup_match_and_register(Key::any(), CallbackFunction::function()) ->
-%%           Value::any() | null:atom()
+%%           Value::any() | undefined:atom()
 %% @doc Lets you look for a Key's Value specifying a pattern that gets passed 
-%%      to ets::match(). Returns null::atom() if no Key is found. Additionally,
+%%      to ets::match(). Returns undefined::atom() if no Key is found. Additionally,
 %%      this functions registers CallbackFunction::function() to be called if 
 %%      the value of Key::any() is changed at a later point.
 lookup_match_and_register(Key, CallbackFunction) ->
@@ -109,7 +109,7 @@
 %%           Key::any(), Default::any(), CallbackFunction::function()) ->
 %%               Value::any() | Default
 %% @doc Lets you look for a Key's Value specifying a pattern that gets passed 
-%%      to ets::match(). Returns null::atom() if no Key is found. Additionally,
+%%      to ets::match(). Returns undefined::atom() if no Key is found. Additionally,
 %%      this functions registers CallbackFunction::function() to be called if 
 %%      the value of Key::any() is changed at a later point.
 lookup_match_and_register(Key, Default, CallbackFunction) ->
@@ -156,7 +156,7 @@
 
 %% @doc See lookup/1
 handle_call({lookup, Key}, _From, Tab) ->
-    lookup(Key, fun(Tab_, Key_) -> ets:lookup(Tab_, Key_) end, null, Tab);
+    lookup(Key, fun(Tab_, Key_) -> ets:lookup(Tab_, Key_) end, undefined, Tab);
 
 %% @doc See lookup/2
 handle_call({lookup, Key, Default}, _From, Tab) ->
@@ -165,7 +165,7 @@
 %% @doc See lookup_and_register/2
 handle_call({lookup_and_register, Key, CallbackFunction}, _From, Tab) ->
     ?MODULE:handle_call({register, Key, CallbackFunction}, _From, Tab),
-    lookup(Key, fun(Tab_, Key_) -> ets:lookup(Tab_, Key_) end, null, Tab);
+    lookup(Key, fun(Tab_, Key_) -> ets:lookup(Tab_, Key_) end, undefined, Tab);
 
 %% @doc See lookup_and_register/3
 handle_call({lookup_and_register, Key, Default, CallbackFunction}, _From, Tab) ->
@@ -174,7 +174,7 @@
 
 %% @doc See lookup_match/1
 handle_call({lookup_match, Key}, _From, Tab) ->
-    lookup(Key, fun(Tab_, Key_) -> ets:match(Tab_, Key_) end, null, Tab);
+    lookup(Key, fun(Tab_, Key_) -> ets:match(Tab_, Key_) end, undefined, Tab);
 
 %% @doc See lookup_match/2
 handle_call({lookup_match, Key, Default}, _From, Tab) ->
@@ -183,7 +183,7 @@
 %% @doc See lookup_match_and_register/2
 handle_call({lookup_match_and_register, Key = {{Module, '$1'}, '$2'}, CallbackFunction},
_From, Tab) ->
     ?MODULE:handle_call({register, {Module, ""}, CallbackFunction}, _From, Tab),
-    lookup(Key, fun(Tab_, Key_) -> ets:match(Tab_, Key_) end, null, Tab);
+    lookup(Key, fun(Tab_, Key_) -> ets:match(Tab_, Key_) end, undefined, Tab);
 
 %% @doc See lookup_match_and_register/3
 handle_call({lookup_match_and_register, Key = {{Module, '$1'}, '$2'}, Default, CallbackFunction},
_From, Tab) ->
@@ -241,11 +241,16 @@
 lookup(Key, Fun, Default, Tab) ->
     Reply = case Fun(Tab, Key) of
         [{Key, Value}] ->
-            Value;
+            {ok, Value};
         [List] ->
-            lists:map(fun([Key2, Value2]) -> {Key2, Value2} end, [List]);
+            {ok, lists:map(fun([Key2, Value2]) -> {Key2, Value2} end, [List])};
         [] ->
-            Default
+            case Default of
+                undefined ->
+                    {error, undefined};
+                _ ->
+                    {ok, Default}
+            end
     end,
     {reply, Reply, Tab}.
 
@@ -257,16 +262,21 @@
     {reply, File, _Tab} = 
         lookup({"_CouchDB", "ConfigurationStorageFile"}, 
             fun(Tab_, Key_) -> ets:lookup(Tab_, Key_) end, 
-            null, Tab
+            undefined, Tab
         ),
-
+        
     notify_registered_modules(Tab, Config),
     commit(Config, File).
 
 %% @spec commit(Config::any(), File::filename()) -> ok
 %% @doc Writes a Key/Value pair to the ini storage file.
 commit(Config, File) ->
-    couch_config_writer:save_config(Config, File).
+    case File of
+        {ok, FileName} ->
+            couch_config_writer:save_config(Config, FileName);
+        _ ->
+            ok
+    end.
 
 %% @spec load_ini_files([File::filename()]) -> ok
 %% @doc Stores the last ini file in Files to be the storage ini file and

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl Fri Jul  4 13:31:10
2008
@@ -46,11 +46,11 @@
     % will restart us and then we will pick up the new settings.
     ConfigChangeCallbackFunction =  fun() -> couch_httpd:stop() end,
     
-    BindAddress = couch_config:lookup_and_register(
+    {ok, BindAddress} = couch_config:lookup_and_register(
         {"HTTPd", "BindAddress"}, ConfigChangeCallbackFunction),
-    Port = couch_config:lookup_and_register(
+    {ok, Port} = couch_config:lookup_and_register(
         {"HTTPd", "Port"}, ConfigChangeCallbackFunction),
-    DocumentRoot = couch_config:lookup_and_register(
+    {ok, DocumentRoot} = couch_config:lookup_and_register(
         {"HTTPd", "DocumentRoot"}, ConfigChangeCallbackFunction),
     
     % and off we go
@@ -683,23 +683,34 @@
     
 % GET /_config/Module/Key
 handle_config_request(Req, 'GET', {[Module, Key]}) ->
-    send_json(Req, 200, {obj, [
-        {ok, true},
-        {module, Module},
-        {key, Key},
-        {value, couch_config:lookup({Module, Key})}
-     ]});
+    case couch_config:lookup({Module, Key}) of
+        {ok, Value} ->
+            send_json(Req, 200, {obj, [
+                {ok, true},
+                {module, Module},
+                {key, Key},
+                {value, Value}
+             ]});
+        undefined ->
+            throw({not_found, unkown_config_value})
+    end;
+
     
 % DELETE /_config/Key
 handle_config_request(Req, 'DELETE', {[Module, Key]}) ->
-    OldValue = couch_config:lookup({Module, Key}),
-    couch_config:unset({Module, Key}),
-    send_json(Req, 200, {obj, [
-        {ok, true},
-        {module, Module},
-        {key, Key},
-        {old_value, OldValue}
-     ]}).
+    case couch_config:lookup({Module, Key}) of
+        {ok, OldValue} ->
+            couch_config:unset({Module, Key}),
+            send_json(Req, 200, {obj, [
+                {ok, true},
+                {module, Module},
+                {key, Key},
+                {old_value, OldValue}
+             ]});
+        undefined ->
+            throw({not_found, unkown_config_value})
+    end.
+
 
 % TODO:
 % POST,PUT /_config/

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_log.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_log.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_log.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_log.erl Fri Jul  4 13:31:10
2008
@@ -40,10 +40,10 @@
     % just stop if one of the config settings change. couch_server_sup
     % will restart us and then we will pick up the new settings.
     ConfigChangeCallbackFunction =  fun() -> ?MODULE:stop() end,
-    Filename = couch_config:lookup_and_register(
+    {ok, Filename} = couch_config:lookup_and_register(
         {"Log", "File"}, ConfigChangeCallbackFunction),
-    Level = couch_config:lookup_and_register(
-        {"Log", "Level"}, ConfigChangeCallbackFunction),
+    {ok, Level} = couch_config:lookup_and_register(
+        {"Log", "Level"}, info, ConfigChangeCallbackFunction),
 
     couch_event_sup:start_link({local, couch_log}, error_logger, couch_log, {Filename, Level}).
 

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_query_servers.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_query_servers.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_query_servers.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_query_servers.erl Fri Jul 
4 13:31:10 2008
@@ -23,7 +23,9 @@
 -include("couch_db.hrl").
 
 timeout() ->
-    list_to_integer(couch_config:lookup({"CouchDB Query Server Options", "QueryTimeout"})).
+    {ok, QueryTimeout} = couch_config:lookup(
+            {"CouchDB Query Server Options", "QueryTimeout"}, "5000"), % 5 secs
+    list_to_integer(QueryTimeout).
 
 start_link() ->
     % read config and register for configuration changes
@@ -32,7 +34,7 @@
     % will restart us and then we will pick up the new settings.
     ConfigChangeCallbackFunction =  fun() -> ?MODULE:stop() end,
     
-    QueryServerList = couch_config:lookup_match_and_register(
+    {ok, QueryServerList} = couch_config:lookup_match_and_register(
         {{"CouchDB Query Servers", '$1'}, '$2'}, [],
         ConfigChangeCallbackFunction),
     couch_config:register(

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server.erl Fri Jul  4 13:31:10
2008
@@ -68,10 +68,10 @@
     % will restart us and then we will pick up the new settings.
     ConfigChangeCallbackFunction =  fun() -> ?MODULE:stop() end,
 
-    RootDir = couch_config:lookup_and_register(
+    {ok, RootDir} = couch_config:lookup_and_register(
         {"CouchDB", "RootDirectory"}, ConfigChangeCallbackFunction),
-    Options = couch_config:lookup_and_register(
-        {"CouchDB", "ServerOptions"}, ConfigChangeCallbackFunction),
+    {ok, Options} = couch_config:lookup_and_register(
+        {"CouchDB", "ServerOptions"}, [], ConfigChangeCallbackFunction),
 
     gen_server:start_link({local, couch_server}, couch_server, {RootDir, Options}, []).
 

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl Fri Jul  4 13:31:10
2008
@@ -42,18 +42,19 @@
     end,
 
     % annoucne startup
+    {ok, LogLevel} = couch_config:lookup({"Log", "Level"}),
     io:format("Apache CouchDB ~s (LogLevel=~s) is starting.~n", [
         couch_server:get_version(),
-        couch_config:lookup({"Log", "Level"})
+        LogLevel
     ]),
 
     % read config and register for configuration changes
 
     % just stop if one of the config settings change. couch_server_sup
     % will restart us and then we will pick up the new settings.
-    ConfigChangeCallbackFunction =  fun() -> ?MODULE:stop() end,
-    UpdateNotificationProcesses = couch_config:lookup({"CouchDB", "UpdateNotificationProcesses"},
[]),
-    FtSearchQueryServer = couch_config:lookup({"Search", "QueryServer"}, []),
+    ConfigChangeCallbackFunction = fun() -> ?MODULE:stop() end,
+    {ok, UpdateNotificationProcesses} = couch_config:lookup({"CouchDB", "UpdateNotificationProcesses"},
[]),
+    {ok, FtSearchQueryServer} = couch_config:lookup({"Search", "QueryServer"}, []),
 
     couch_config:register(
         {"CouchDB", "UpdateNotificationProcesses"}, ConfigChangeCallbackFunction),
@@ -130,11 +131,16 @@
     StartResult = (catch supervisor:start_link(
         {local, couch_server_sup}, couch_server_sup, ChildProcesses)),
 
+    {ok, BindAddress} = couch_config:lookup_and_register(
+        {"HTTPd", "BindAddress"}, ConfigChangeCallbackFunction),
+    {ok, Port} = couch_config:lookup_and_register(
+        {"HTTPd", "Port"}, ConfigChangeCallbackFunction),
+
     case StartResult of
     {ok,_} ->
         % only output when startup was successful
         io:format("Apache CouchDB has started, see http://~s:~s/_utils/index.html~n",
-            [couch_config:lookup({"HTTPd", "BindAddress"}), couch_config:lookup({"HTTPd",
"Port"})]);
+            [BindAddress, Port]);
     _ ->
         % Since we failed startup, unconditionally dump configuration data to console
         ok = couch_config:dump()

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_util.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_util.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_util.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_util.erl Fri Jul  4 13:31:10
2008
@@ -29,10 +29,10 @@
     % will restart us and then we will pick up the new settings.
     ConfigChangeCallbackFunction =  fun() -> couch_server:stop(couch_config_change) end,
     
-    LibDir1 = couch_config:lookup_and_register(
-        {"CouchDB", "UtilDriverDir"}, ConfigChangeCallbackFunction),
+    {ok, LibDir1} = couch_config:lookup_and_register(
+        {"CouchDB", "UtilDriverDir"}, ConfigChangeCallbackFunction, none),
     case LibDir1 of
-        null ->
+        none ->
             LibDir = filename:join(code:priv_dir(couch), "lib");
         _ ->
             LibDir = LibDir1

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_view.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_view.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_view.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_view.erl Fri Jul  4 13:31:10
2008
@@ -48,7 +48,7 @@
 start_link() ->
     
     % read configuration settings and register for configuration changes
-    RootDir = couch_config:lookup_and_register(
+    {ok, RootDir} = couch_config:lookup_and_register(
         {"CouchDB", "RootDirectory"}, fun() -> terminate(config_change) end),
     
     gen_server:start_link({local, couch_view}, couch_view, RootDir, []).

Modified: incubator/couchdb/branches/runtimeconfig/src/mochiweb/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/mochiweb/Makefile.am?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/mochiweb/Makefile.am (original)
+++ incubator/couchdb/branches/runtimeconfig/src/mochiweb/Makefile.am Fri Jul  4 13:31:10
2008
@@ -12,17 +12,7 @@
 
 mochiwebebindir = $(localerlanglibdir)/mochiweb-r82/ebin
 
-mochiwebebin_DATA = $(static_files) $(compiled_files)
-
-dist_devdoc_DATA = $(doc_base) $(doc_modules)
-
-EXTRA_DIST = $(static_files) $(source_files)
-
-CLEANFILES = $(compiled_files) $(doc_base) $(doc_modules) edoc-info
-
-static_files = mochiweb.app
-
-source_files = \
+mochiweb_file_collection = \
     mochifmt.erl \
     mochifmt_records.erl \
     mochifmt_std.erl \
@@ -47,7 +37,9 @@
     mochiweb_util.erl \
     reloader.erl
 
-compiled_files = \
+mochiwebebin_static_file = mochiweb.app
+
+mochiwebebin_make_generated_file_list = \
     mochifmt.beam \
     mochifmt_records.beam \
     mochifmt_std.beam \
@@ -72,47 +64,16 @@
     mochiweb_util.beam \
     reloader.beam
 
-doc_base = \
-    erlang.png \
-    index.html \
-    modules-frame.html \
-    overview-summary.html \
-    packages-frame.html \
-    stylesheet.css
-
-doc_modules = \
-    mochifmt.html \
-    mochifmt_records.html \
-    mochifmt_std.html \
-    mochihex.html \
-    mochijson.html \
-    mochijson2.html \
-    mochinum.html \
-    mochiweb.html \
-    mochiweb_app.html \
-    mochiweb_charref.html \
-    mochiweb_cookies.html \
-    mochiweb_echo.html \
-    mochiweb_headers.html \
-    mochiweb_html.html \
-    mochiweb_http.html \
-    mochiweb_multipart.html \
-    mochiweb_request.html \
-    mochiweb_response.html \
-    mochiweb_skel.html \
-    mochiweb_socket_server.html \
-    mochiweb_sup.html \
-    mochiweb_util.html \
-    reloader.html
-
-$(dist_devdoc_DATA): $(source_files)
-	for file in $(source_files); do \
-	    if test -n "$$edoc_files"; then \
-	        edoc_files="$$edoc_files, "; \
-	    fi; \
-	    edoc_files="$$edoc_files \"$$file\""; \
-	done; \
-	erl -noshell -run edoc_run files ["$$edoc_files"]
+mochiwebebin_DATA = \
+    $(mochiwebebin_static_file) \
+    $(mochiwebebin_make_generated_file_list)
+
+EXTRA_DIST =  \
+    $(mochiweb_file_collection) \
+    $(mochiwebebin_static_file)
+
+CLEANFILES = \
+    $(mochiwebebin_make_generated_file_list)
 
 %.beam: %.erl
 	$(ERLC) $<

Modified: incubator/couchdb/branches/runtimeconfig/test/couch_config_test.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/test/couch_config_test.erl?rev=674116&r1=674115&r2=674116&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/test/couch_config_test.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/test/couch_config_test.erl Fri Jul  4 13:31:10
2008
@@ -33,7 +33,7 @@
     couch_config:start_link(),
 
     couch_config:init_value(Key, Value),
-    Result = couch_config:lookup(Key),
+    {ok, Result} = couch_config:lookup(Key),
     couch_config:unset(Key),
 
     couch_config:stop(),



Mime
View raw message